BokaMera.API.Host

<back to all web services

RemoveTagFromCustomer

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
DELETE/customers/{CustomerId}/tags/{TagId}Remove a tag from a customerDetaches a tag from an existing customer.
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    @ApiResponse(Description="Returned if the customer or tag relation was not found", StatusCode=404)
    // @ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401)
    @ValidateRequest(Validator="IsAuthenticated")
    public static class RemoveTagFromCustomer implements ICompany
    {
        /**
        * The company id, if empty will use the company id for the user you are logged in with.
        */
        @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
        public UUID CompanyId = null;

        /**
        * The customer id.
        */
        @ApiMember(Description="The customer id.", IsRequired=true, ParameterType="path")
        public UUID CustomerId = null;

        /**
        * The tag id to remove.
        */
        @ApiMember(Description="The tag id to remove.", IsRequired=true, ParameterType="path")
        public Integer TagId = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public RemoveTagFromCustomer setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public UUID getCustomerId() { return CustomerId; }
        public RemoveTagFromCustomer setCustomerId(UUID value) { this.CustomerId = value; return this; }
        public Integer getTagId() { return TagId; }
        public RemoveTagFromCustomer setTagId(Integer value) { this.TagId = value; return this; }
    }

    public static class CustomerQueryResponse
    {
        public UUID Id = null;
        public String Firstname = null;
        public String Lastname = null;
        public String Email = null;
        public String Phone = null;
        public String ImageUrl = null;
        public String PersonalIdentityNumber = null;
        public ArrayList<CustomFieldConfigData> CustomFields = new ArrayList<CustomFieldConfigData>();
        public ArrayList<CustomFieldDataResponse> CustomFieldValues = new ArrayList<CustomFieldDataResponse>();
        public ArrayList<CustomerCommentsResponse> Comments = new ArrayList<CustomerCommentsResponse>();
        public ArrayList<UserAccessKeys> AccessKeys = new ArrayList<UserAccessKeys>();
        public Date Updated = null;
        public Date Created = null;
        public Object ResponseStatus = null;
        public Boolean SubscribedToNewsletter = null;
        public InvoiceAddressResponse InvoiceAddress = null;
        public ArrayList<TagResponse> Tags = new ArrayList<TagResponse>();
        
        public UUID getId() { return Id; }
        public CustomerQueryResponse setId(UUID value) { this.Id = value; return this; }
        public String getFirstname() { return Firstname; }
        public CustomerQueryResponse setFirstname(String value) { this.Firstname = value; return this; }
        public String getLastname() { return Lastname; }
        public CustomerQueryResponse setLastname(String value) { this.Lastname = value; return this; }
        public String getEmail() { return Email; }
        public CustomerQueryResponse setEmail(String value) { this.Email = value; return this; }
        public String getPhone() { return Phone; }
        public CustomerQueryResponse setPhone(String value) { this.Phone = value; return this; }
        public String getImageUrl() { return ImageUrl; }
        public CustomerQueryResponse setImageUrl(String value) { this.ImageUrl = value; return this; }
        public String getPersonalIdentityNumber() { return PersonalIdentityNumber; }
        public CustomerQueryResponse setPersonalIdentityNumber(String value) { this.PersonalIdentityNumber = value; return this; }
        public ArrayList<CustomFieldConfigData> getCustomFields() { return CustomFields; }
        public CustomerQueryResponse setCustomFields(ArrayList<CustomFieldConfigData> value) { this.CustomFields = value; return this; }
        public ArrayList<CustomFieldDataResponse> getCustomFieldValues() { return CustomFieldValues; }
        public CustomerQueryResponse setCustomFieldValues(ArrayList<CustomFieldDataResponse> value) { this.CustomFieldValues = value; return this; }
        public ArrayList<CustomerCommentsResponse> getComments() { return Comments; }
        public CustomerQueryResponse setComments(ArrayList<CustomerCommentsResponse> value) { this.Comments = value; return this; }
        public ArrayList<UserAccessKeys> getAccessKeys() { return AccessKeys; }
        public CustomerQueryResponse setAccessKeys(ArrayList<UserAccessKeys> value) { this.AccessKeys = value; return this; }
        public Date getUpdated() { return Updated; }
        public CustomerQueryResponse setUpdated(Date value) { this.Updated = value; return this; }
        public Date getCreated() { return Created; }
        public CustomerQueryResponse setCreated(Date value) { this.Created = value; return this; }
        public Object getResponseStatus() { return ResponseStatus; }
        public CustomerQueryResponse setResponseStatus(Object value) { this.ResponseStatus = value; return this; }
        public Boolean isSubscribedToNewsletter() { return SubscribedToNewsletter; }
        public CustomerQueryResponse setSubscribedToNewsletter(Boolean value) { this.SubscribedToNewsletter = value; return this; }
        public InvoiceAddressResponse getInvoiceAddress() { return InvoiceAddress; }
        public CustomerQueryResponse setInvoiceAddress(InvoiceAddressResponse value) { this.InvoiceAddress = value; return this; }
        public ArrayList<TagResponse> getTags() { return Tags; }
        public CustomerQueryResponse setTags(ArrayList<TagResponse> value) { this.Tags = value; return this; }
    }

    public static class CustomFieldConfigData
    {
        /**
        * Custom field id
        */
        @ApiMember(Description="Custom field id")
        public Integer Id = null;

        /**
        * Configuration name. Example: 'Number of persons'.
        */
        @ApiMember(Description="Configuration name. Example: 'Number of persons'.")
        public String Name = null;

        /**
        * Custom field description. Example: 'For how many persons is this booking?'
        */
        @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'")
        public String Description = null;

        /**
        * Field width. Example: 20 for 20px
        */
        @ApiMember(Description="Field width. Example: 20 for 20px")
        public Integer Width = null;

        /**
        * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
        */
        @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")
        public String DataType = null;

        /**
        * Default value of the field. Example: '3'
        */
        @ApiMember(Description="Default value of the field. Example: '3'")
        public String DefaultValue = null;

        /**
        * Determines if the field is required to have a value or not
        */
        @ApiMember(Description="Determines if the field is required to have a value or not")
        public Boolean IsMandatory = null;

        /**
        * Error message shown to the user if the field data is required but not entered
        */
        @ApiMember(Description="Error message shown to the user if the field data is required but not entered")
        public String MandatoryErrorMessage = null;

        /**
        * Max lenght of the field
        */
        @ApiMember(Description="Max lenght of the field")
        public Integer MaxLength = null;

        /**
        * If the field should have multiple lines
        */
        @ApiMember(Description="If the field should have multiple lines")
        public Boolean MultipleLineText = null;

        /**
        * Regular expression used for validation of the field
        */
        @ApiMember(Description="Regular expression used for validation of the field")
        public String RegEx = null;

        /**
        * Error message shown if the regular expression validation failed
        */
        @ApiMember(Description="Error message shown if the regular expression validation failed")
        public String RegExErrorMessage = null;

        /**
        * The values to select from if Datatype is DropDown for this custom field
        */
        @ApiMember(Description="The values to select from if Datatype is DropDown for this custom field")
        public ArrayList<CustomFieldValueResponse> Values = new ArrayList<CustomFieldValueResponse>();
        
        public Integer getId() { return Id; }
        public CustomFieldConfigData setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public CustomFieldConfigData setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public CustomFieldConfigData setDescription(String value) { this.Description = value; return this; }
        public Integer getWidth() { return Width; }
        public CustomFieldConfigData setWidth(Integer value) { this.Width = value; return this; }
        public String getDataType() { return DataType; }
        public CustomFieldConfigData setDataType(String value) { this.DataType = value; return this; }
        public String getDefaultValue() { return DefaultValue; }
        public CustomFieldConfigData setDefaultValue(String value) { this.DefaultValue = value; return this; }
        public Boolean getIsMandatory() { return IsMandatory; }
        public CustomFieldConfigData setIsMandatory(Boolean value) { this.IsMandatory = value; return this; }
        public String getMandatoryErrorMessage() { return MandatoryErrorMessage; }
        public CustomFieldConfigData setMandatoryErrorMessage(String value) { this.MandatoryErrorMessage = value; return this; }
        public Integer getMaxLength() { return MaxLength; }
        public CustomFieldConfigData setMaxLength(Integer value) { this.MaxLength = value; return this; }
        public Boolean isMultipleLineText() { return MultipleLineText; }
        public CustomFieldConfigData setMultipleLineText(Boolean value) { this.MultipleLineText = value; return this; }
        public String getRegEx() { return RegEx; }
        public CustomFieldConfigData setRegEx(String value) { this.RegEx = value; return this; }
        public String getRegExErrorMessage() { return RegExErrorMessage; }
        public CustomFieldConfigData setRegExErrorMessage(String value) { this.RegExErrorMessage = value; return this; }
        public ArrayList<CustomFieldValueResponse> getValues() { return Values; }
        public CustomFieldConfigData setValues(ArrayList<CustomFieldValueResponse> value) { this.Values = value; return this; }
    }

    public static class CustomFieldValueResponse
    {
        public String Value = null;
        
        public String getValue() { return Value; }
        public CustomFieldValueResponse setValue(String value) { this.Value = value; return this; }
    }

    public static class CustomFieldDataResponse
    {
        public Integer Id = null;
        public String Column = null;
        public String Name = null;
        public String Description = null;
        public String Value = null;
        /**
        * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
        */
        @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")
        public String DataType = null;
        
        public Integer getId() { return Id; }
        public CustomFieldDataResponse setId(Integer value) { this.Id = value; return this; }
        public String getColumn() { return Column; }
        public CustomFieldDataResponse setColumn(String value) { this.Column = value; return this; }
        public String getName() { return Name; }
        public CustomFieldDataResponse setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public CustomFieldDataResponse setDescription(String value) { this.Description = value; return this; }
        public String getValue() { return Value; }
        public CustomFieldDataResponse setValue(String value) { this.Value = value; return this; }
        public String getDataType() { return DataType; }
        public CustomFieldDataResponse setDataType(String value) { this.DataType = value; return this; }
    }

    public static class CustomerCommentsResponse
    {
        public Integer Id = null;
        public UUID CustomerId = null;
        public String Comments = null;
        public Date Updated = null;
        public Date Created = null;
        public Uri ImageUrl = null;
        
        public Integer getId() { return Id; }
        public CustomerCommentsResponse setId(Integer value) { this.Id = value; return this; }
        public UUID getCustomerId() { return CustomerId; }
        public CustomerCommentsResponse setCustomerId(UUID value) { this.CustomerId = value; return this; }
        public String getComments() { return Comments; }
        public CustomerCommentsResponse setComments(String value) { this.Comments = value; return this; }
        public Date getUpdated() { return Updated; }
        public CustomerCommentsResponse setUpdated(Date value) { this.Updated = value; return this; }
        public Date getCreated() { return Created; }
        public CustomerCommentsResponse setCreated(Date value) { this.Created = value; return this; }
        public Uri getImageUrl() { return ImageUrl; }
        public CustomerCommentsResponse setImageUrl(Uri value) { this.ImageUrl = value; return this; }
    }

    public static class UserAccessKeys extends BaseModel
    {
        @Required()
        public UUID CompanyId = null;

        @Required()
        public Integer AccessKeyTypeId = null;

        @Required()
        public String Value = null;

        @Required()
        public UUID CustomerId = null;

        public String Description = null;
        @Required()
        public UUID Id = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public UserAccessKeys setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getAccessKeyTypeId() { return AccessKeyTypeId; }
        public UserAccessKeys setAccessKeyTypeId(Integer value) { this.AccessKeyTypeId = value; return this; }
        public String getValue() { return Value; }
        public UserAccessKeys setValue(String value) { this.Value = value; return this; }
        public UUID getCustomerId() { return CustomerId; }
        public UserAccessKeys setCustomerId(UUID value) { this.CustomerId = value; return this; }
        public String getDescription() { return Description; }
        public UserAccessKeys setDescription(String value) { this.Description = value; return this; }
        public UUID getId() { return Id; }
        public UserAccessKeys setId(UUID value) { this.Id = value; return this; }
    }

    public static class BaseModel
    {
        
    }

    public static class InvoiceAddressResponse
    {
        public UUID InvoiceAddressId = null;
        public UUID UserId = null;
        public String CorporateIdentityNumber = null;
        public String InvoiceAddress1 = null;
        public String InvoiceAddress2 = null;
        public String InvoiceCity = null;
        public String InvoicePostalCode = null;
        public String InvoiceCountryCode = null;
        
        public UUID getInvoiceAddressId() { return InvoiceAddressId; }
        public InvoiceAddressResponse setInvoiceAddressId(UUID value) { this.InvoiceAddressId = value; return this; }
        public UUID getUserId() { return UserId; }
        public InvoiceAddressResponse setUserId(UUID value) { this.UserId = value; return this; }
        public String getCorporateIdentityNumber() { return CorporateIdentityNumber; }
        public InvoiceAddressResponse setCorporateIdentityNumber(String value) { this.CorporateIdentityNumber = value; return this; }
        public String getInvoiceAddress1() { return InvoiceAddress1; }
        public InvoiceAddressResponse setInvoiceAddress1(String value) { this.InvoiceAddress1 = value; return this; }
        public String getInvoiceAddress2() { return InvoiceAddress2; }
        public InvoiceAddressResponse setInvoiceAddress2(String value) { this.InvoiceAddress2 = value; return this; }
        public String getInvoiceCity() { return InvoiceCity; }
        public InvoiceAddressResponse setInvoiceCity(String value) { this.InvoiceCity = value; return this; }
        public String getInvoicePostalCode() { return InvoicePostalCode; }
        public InvoiceAddressResponse setInvoicePostalCode(String value) { this.InvoicePostalCode = value; return this; }
        public String getInvoiceCountryCode() { return InvoiceCountryCode; }
        public InvoiceAddressResponse setInvoiceCountryCode(String value) { this.InvoiceCountryCode = value; return this; }
    }

    public static class TagResponse
    {
        public Integer Id = null;
        public UUID CompanyId = null;
        public String Name = null;
        public Integer Scope = null;
        public String Color = null;
        public Integer SortOrder = null;
        public Boolean Active = null;
        public Date CreatedDate = null;
        public ResponseStatus ResponseStatus = null;
        
        public Integer getId() { return Id; }
        public TagResponse setId(Integer value) { this.Id = value; return this; }
        public UUID getCompanyId() { return CompanyId; }
        public TagResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public String getName() { return Name; }
        public TagResponse setName(String value) { this.Name = value; return this; }
        public Integer getScope() { return Scope; }
        public TagResponse setScope(Integer value) { this.Scope = value; return this; }
        public String getColor() { return Color; }
        public TagResponse setColor(String value) { this.Color = value; return this; }
        public Integer getSortOrder() { return SortOrder; }
        public TagResponse setSortOrder(Integer value) { this.SortOrder = value; return this; }
        public Boolean isActive() { return Active; }
        public TagResponse setActive(Boolean value) { this.Active = value; return this; }
        public Date getCreatedDate() { return CreatedDate; }
        public TagResponse setCreatedDate(Date value) { this.CreatedDate = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public TagResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

}

Java RemoveTagFromCustomer DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

DELETE /customers/{CustomerId}/tags/{TagId} HTTP/1.1 
Host: api.bookmore.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CustomerQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <AccessKeys xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Db">
    <d2p1:UserAccessKeys>
      <d2p1:AccessKeyTypeId>0</d2p1:AccessKeyTypeId>
      <d2p1:CompanyId>00000000-0000-0000-0000-000000000000</d2p1:CompanyId>
      <d2p1:CustomerId>00000000-0000-0000-0000-000000000000</d2p1:CustomerId>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:Id>00000000-0000-0000-0000-000000000000</d2p1:Id>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:UserAccessKeys>
  </AccessKeys>
  <Comments>
    <CustomerCommentsResponse>
      <Comments>String</Comments>
      <Created>0001-01-01T00:00:00</Created>
      <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
      <Id>0</Id>
      <ImageUrl i:nil="true" />
      <Updated>0001-01-01T00:00:00</Updated>
    </CustomerCommentsResponse>
  </Comments>
  <Created>0001-01-01T00:00:00</Created>
  <CustomFieldValues>
    <CustomFieldDataResponse>
      <Column>String</Column>
      <DataType>String</DataType>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
      <Value>String</Value>
    </CustomFieldDataResponse>
  </CustomFieldValues>
  <CustomFields>
    <CustomFieldConfigData>
      <DataType>String</DataType>
      <DefaultValue>String</DefaultValue>
      <Description>String</Description>
      <Id>0</Id>
      <IsMandatory>false</IsMandatory>
      <MandatoryErrorMessage>String</MandatoryErrorMessage>
      <MaxLength>0</MaxLength>
      <MultipleLineText>false</MultipleLineText>
      <Name>String</Name>
      <RegEx>String</RegEx>
      <RegExErrorMessage>String</RegExErrorMessage>
      <Values>
        <CustomFieldValueResponse>
          <Value>String</Value>
        </CustomFieldValueResponse>
      </Values>
      <Width>0</Width>
    </CustomFieldConfigData>
  </CustomFields>
  <Email>String</Email>
  <Firstname>String</Firstname>
  <Id>00000000-0000-0000-0000-000000000000</Id>
  <ImageUrl>String</ImageUrl>
  <InvoiceAddress>
    <CorporateIdentityNumber>String</CorporateIdentityNumber>
    <InvoiceAddress1>String</InvoiceAddress1>
    <InvoiceAddress2>String</InvoiceAddress2>
    <InvoiceAddressId>00000000-0000-0000-0000-000000000000</InvoiceAddressId>
    <InvoiceCity>String</InvoiceCity>
    <InvoiceCountryCode>String</InvoiceCountryCode>
    <InvoicePostalCode>String</InvoicePostalCode>
    <UserId>00000000-0000-0000-0000-000000000000</UserId>
  </InvoiceAddress>
  <Lastname>String</Lastname>
  <PersonalIdentityNumber>String</PersonalIdentityNumber>
  <Phone>String</Phone>
  <ResponseStatus />
  <SubscribedToNewsletter>false</SubscribedToNewsletter>
  <Tags>
    <TagResponse>
      <Active>false</Active>
      <Color>String</Color>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <CreatedDate>0001-01-01T00:00:00</CreatedDate>
      <Id>0</Id>
      <Name>String</Name>
      <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types">
        <d4p1:ErrorCode>String</d4p1:ErrorCode>
        <d4p1:Message>String</d4p1:Message>
        <d4p1:StackTrace>String</d4p1:StackTrace>
        <d4p1:Errors>
          <d4p1:ResponseError>
            <d4p1:ErrorCode>String</d4p1:ErrorCode>
            <d4p1:FieldName>String</d4p1:FieldName>
            <d4p1:Message>String</d4p1:Message>
            <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:KeyValueOfstringstring>
                <d7p1:Key>String</d7p1:Key>
                <d7p1:Value>String</d7p1:Value>
              </d7p1:KeyValueOfstringstring>
            </d4p1:Meta>
          </d4p1:ResponseError>
        </d4p1:Errors>
        <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d4p1:Meta>
      </ResponseStatus>
      <Scope>0</Scope>
      <SortOrder>0</SortOrder>
    </TagResponse>
  </Tags>
  <Updated>0001-01-01T00:00:00</Updated>
</CustomerQueryResponse>