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.*


@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")
open class RemoveTagFromCustomer : 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.")
    override var CompanyId:UUID? = null

    /**
    * The customer id.
    */
    @ApiMember(Description="The customer id.", IsRequired=true, ParameterType="path")
    open var CustomerId:UUID? = null

    /**
    * The tag id to remove.
    */
    @ApiMember(Description="The tag id to remove.", IsRequired=true, ParameterType="path")
    open var TagId:Int? = null
}

open class CustomerQueryResponse
{
    open var Id:UUID? = null
    open var Firstname:String? = null
    open var Lastname:String? = null
    open var Email:String? = null
    open var Phone:String? = null
    open var ImageUrl:String? = null
    open var PersonalIdentityNumber:String? = null
    open var CustomFields:ArrayList<CustomFieldConfigData> = ArrayList<CustomFieldConfigData>()
    open var CustomFieldValues:ArrayList<CustomFieldDataResponse> = ArrayList<CustomFieldDataResponse>()
    open var Comments:ArrayList<CustomerCommentsResponse> = ArrayList<CustomerCommentsResponse>()
    open var AccessKeys:ArrayList<UserAccessKeys> = ArrayList<UserAccessKeys>()
    open var Updated:Date? = null
    open var Created:Date? = null
    open var ResponseStatus:Object? = null
    open var SubscribedToNewsletter:Boolean? = null
    open var InvoiceAddress:InvoiceAddressResponse? = null
    open var Tags:ArrayList<TagResponse> = ArrayList<TagResponse>()
}

open class CustomFieldConfigData
{
    /**
    * Custom field id
    */
    @ApiMember(Description="Custom field id")
    open var Id:Int? = null

    /**
    * Configuration name. Example: 'Number of persons'.
    */
    @ApiMember(Description="Configuration name. Example: 'Number of persons'.")
    open var Name:String? = 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?'")
    open var Description:String? = null

    /**
    * Field width. Example: 20 for 20px
    */
    @ApiMember(Description="Field width. Example: 20 for 20px")
    open var Width:Int? = 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'")
    open var DataType:String? = null

    /**
    * Default value of the field. Example: '3'
    */
    @ApiMember(Description="Default value of the field. Example: '3'")
    open var DefaultValue:String? = 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")
    open var IsMandatory:Boolean? = 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")
    open var MandatoryErrorMessage:String? = null

    /**
    * Max lenght of the field
    */
    @ApiMember(Description="Max lenght of the field")
    open var MaxLength:Int? = null

    /**
    * If the field should have multiple lines
    */
    @ApiMember(Description="If the field should have multiple lines")
    open var MultipleLineText:Boolean? = null

    /**
    * Regular expression used for validation of the field
    */
    @ApiMember(Description="Regular expression used for validation of the field")
    open var RegEx:String? = null

    /**
    * Error message shown if the regular expression validation failed
    */
    @ApiMember(Description="Error message shown if the regular expression validation failed")
    open var RegExErrorMessage:String? = 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")
    open var Values:ArrayList<CustomFieldValueResponse> = ArrayList<CustomFieldValueResponse>()
}

open class CustomFieldValueResponse
{
    open var Value:String? = null
}

open class CustomFieldDataResponse
{
    open var Id:Int? = null
    open var Column:String? = null
    open var Name:String? = null
    open var Description:String? = null
    open var Value:String? = 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'")
    open var DataType:String? = null
}

open class CustomerCommentsResponse
{
    open var Id:Int? = null
    open var CustomerId:UUID? = null
    open var Comments:String? = null
    open var Updated:Date? = null
    open var Created:Date? = null
    open var ImageUrl:Uri? = null
}

open class UserAccessKeys : BaseModel()
{
    @Required()
    open var CompanyId:UUID? = null

    @Required()
    open var AccessKeyTypeId:Int? = null

    @Required()
    open var Value:String? = null

    @Required()
    open var CustomerId:UUID? = null

    open var Description:String? = null
    @Required()
    open var Id:UUID? = null
}

open class BaseModel
{
}

open class InvoiceAddressResponse
{
    open var InvoiceAddressId:UUID? = null
    open var UserId:UUID? = null
    open var CorporateIdentityNumber:String? = null
    open var InvoiceAddress1:String? = null
    open var InvoiceAddress2:String? = null
    open var InvoiceCity:String? = null
    open var InvoicePostalCode:String? = null
    open var InvoiceCountryCode:String? = null
}

open class TagResponse
{
    open var Id:Int? = null
    open var CompanyId:UUID? = null
    open var Name:String? = null
    open var Scope:TagScope? = null
    open var Color:String? = null
    open var SortOrder:Int? = null
    open var Active:Boolean? = null
    open var CreatedDate:Date? = null
    open var ResponseStatus:ResponseStatus? = null
}

enum class TagScope
{
    Booking,
    Customer,
}

Kotlin 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: testapi.bokamera.se 
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>Booking</Scope>
      <SortOrder>0</SortOrder>
    </TagResponse>
  </Tags>
  <Updated>0001-01-01T00:00:00</Updated>
</CustomerQueryResponse>