| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| DELETE | /customers/{Id} | Delete an existing customer | Delete an existing user if the current logged in user is allowed to update the specified customer. All connected information to the customer will be deleted. |
|---|
"use strict";
export class CustomFieldValueResponse {
/** @param {{Value?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Value;
}
export class CustomFieldConfigData {
/** @param {{Id?:number,Name?:string,Description?:string,Width?:number,DataType?:string,DefaultValue?:string,IsMandatory?:boolean,MandatoryErrorMessage?:string,MaxLength?:number,MultipleLineText?:boolean,RegEx?:string,RegExErrorMessage?:string,Values?:CustomFieldValueResponse[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description Custom field id */
Id;
/**
* @type {string}
* @description Configuration name. Example: 'Number of persons'. */
Name;
/**
* @type {string}
* @description Custom field description. Example: 'For how many persons is this booking?' */
Description;
/**
* @type {?number}
* @description Field width. Example: 20 for 20px */
Width;
/**
* @type {string}
* @description Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */
DataType;
/**
* @type {string}
* @description Default value of the field. Example: '3' */
DefaultValue;
/**
* @type {boolean}
* @description Determines if the field is required to have a value or not */
IsMandatory;
/**
* @type {string}
* @description Error message shown to the user if the field data is required but not entered */
MandatoryErrorMessage;
/**
* @type {number}
* @description Max lenght of the field */
MaxLength;
/**
* @type {boolean}
* @description If the field should have multiple lines */
MultipleLineText;
/**
* @type {string}
* @description Regular expression used for validation of the field */
RegEx;
/**
* @type {string}
* @description Error message shown if the regular expression validation failed */
RegExErrorMessage;
/**
* @type {CustomFieldValueResponse[]}
* @description The values to select from if Datatype is DropDown for this custom field */
Values = [];
}
export class CustomFieldDataResponse {
/** @param {{Id?:number,Column?:string,Name?:string,Description?:string,Value?:string,DataType?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Column;
/** @type {string} */
Name;
/** @type {string} */
Description;
/** @type {string} */
Value;
/**
* @type {string}
* @description Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */
DataType;
}
export class CustomerCommentsResponse {
/** @param {{Id?:number,CustomerId?:string,Comments?:string,Updated?:string,Created?:string,ImageUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
CustomerId;
/** @type {string} */
Comments;
/** @type {string} */
Updated;
/** @type {string} */
Created;
/** @type {string} */
ImageUrl;
}
export class BaseModel {
constructor(init) { Object.assign(this, init) }
}
export class UserAccessKeys extends BaseModel {
/** @param {{CompanyId?:string,AccessKeyTypeId?:number,Value?:string,CustomerId?:string,Description?:string,Id?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
CompanyId;
/** @type {number} */
AccessKeyTypeId;
/** @type {string} */
Value;
/** @type {string} */
CustomerId;
/** @type {string} */
Description;
/** @type {string} */
Id;
}
export class InvoiceAddressResponse {
/** @param {{InvoiceAddressId?:string,UserId?:string,CorporateIdentityNumber?:string,InvoiceAddress1?:string,InvoiceAddress2?:string,InvoiceCity?:string,InvoicePostalCode?:string,InvoiceCountryCode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
InvoiceAddressId;
/** @type {?string} */
UserId;
/** @type {string} */
CorporateIdentityNumber;
/** @type {string} */
InvoiceAddress1;
/** @type {string} */
InvoiceAddress2;
/** @type {string} */
InvoiceCity;
/** @type {string} */
InvoicePostalCode;
/** @type {string} */
InvoiceCountryCode;
}
export class CustomerQueryResponse {
/** @param {{Id?:string,Firstname?:string,Lastname?:string,Email?:string,Phone?:string,ImageUrl?:string,CustomFields?:CustomFieldConfigData[],CustomFieldValues?:CustomFieldDataResponse[],Comments?:CustomerCommentsResponse[],AccessKeys?:UserAccessKeys[],Updated?:string,Created?:string,ResponseStatus?:Object,SubscribedToNewsletter?:boolean,InvoiceAddress?:InvoiceAddressResponse}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Firstname;
/** @type {string} */
Lastname;
/** @type {string} */
Email;
/** @type {string} */
Phone;
/** @type {string} */
ImageUrl;
/** @type {CustomFieldConfigData[]} */
CustomFields = [];
/** @type {CustomFieldDataResponse[]} */
CustomFieldValues = [];
/** @type {CustomerCommentsResponse[]} */
Comments = [];
/** @type {UserAccessKeys[]} */
AccessKeys = [];
/** @type {string} */
Updated;
/** @type {string} */
Created;
/** @type {Object} */
ResponseStatus;
/** @type {boolean} */
SubscribedToNewsletter;
/** @type {InvoiceAddressResponse} */
InvoiceAddress;
}
export class DeleteCustomer {
/** @param {{CompanyId?:string,Id?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?string}
* @description Enter the company and id for the customer, if blank company id and you are an admin, your company id will be used. */
CompanyId;
/**
* @type {string}
* @description customer id */
Id;
}
JavaScript DeleteCustomer DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
DELETE /customers/{Id} HTTP/1.1
Host: api.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>
<Phone>String</Phone>
<ResponseStatus />
<SubscribedToNewsletter>false</SubscribedToNewsletter>
<Updated>0001-01-01T00:00:00</Updated>
</CustomerQueryResponse>