BokaMera.API.Host

<back to all web services

DeleteCustomer

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
DELETE/customers/{Id}Delete an existing customerDelete 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.
DeleteCustomer Parameters:
NameParameterData TypeRequiredDescription
CompanyIdqueryGuid?NoEnter the company and id for the customer, if blank company id and you are an admin, your company id will be used.
IdpathGuidYescustomer id
CustomerQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
FirstnameformstringNo
LastnameformstringNo
EmailformstringNo
PhoneformstringNo
ImageUrlformstringNo
CustomFieldsformList<CustomFieldConfigData>No
CustomFieldValuesformList<CustomFieldDataResponse>No
CommentsformList<CustomerCommentsResponse>No
AccessKeysformList<UserAccessKeys>No
UpdatedformDateTimeNo
CreatedformDateTimeNo
ResponseStatusformObjectNo
SubscribedToNewsletterformboolNo
InvoiceAddressformInvoiceAddressNo
CustomFieldConfigData Parameters:
NameParameterData TypeRequiredDescription
IdformintNoCustom field id
NameformstringNoConfiguration name. Example: 'Number of persons'.
DescriptionformstringNoCustom field description. Example: 'For how many persons is this booking?'
Widthformint?NoField width. Example: 20 for 20px
DataTypeformstringNoData field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
DefaultValueformstringNoDefault value of the field. Example: '3'
IsMandatoryformboolNoDetermines if the field is required to have a value or not
MandatoryErrorMessageformstringNoError message shown to the user if the field data is required but not entered
MaxLengthformintNoMax lenght of the field
MultipleLineTextformboolNoIf the field should have multiple lines
RegExformstringNoRegular expression used for validation of the field
RegExErrorMessageformstringNoError message shown if the regular expression validation failed
ValuesformList<CustomFieldValueResponse>NoThe values to select from if Datatype is DropDown for this custom field
CustomFieldValueResponse Parameters:
NameParameterData TypeRequiredDescription
ValueformstringNo
CustomFieldDataResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
ColumnformstringNo
NameformstringNo
DescriptionformstringNo
ValueformstringNo
DataTypeformstringNoData field of custom field. Valid values are: TextBox, ... Example: 'TextBox'
CustomerCommentsResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
CustomerIdformGuidNo
CommentsformstringNo
UpdatedformDateTimeNo
CreatedformDateTimeNo
ImageUrlformUriNo
UserAccessKeys Parameters:
NameParameterData TypeRequiredDescription
CompanyIdformGuidYes
AccessKeyTypeIdformintYes
ValueformstringYes
CustomerIdformGuidYes
DescriptionformstringNo
IdformGuidYes
InvoiceAddress Parameters:
NameParameterData TypeRequiredDescription
CorporateIdentityNumberformstringNo
InvoiceAddress1formstringNo
InvoiceAddress2formstringNo
InvoiceCityformstringNo
InvoicePostalCodeformstringNo
InvoiceCountryCodeformstringNo

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

HTTP + JSV

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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Firstname: String,
	Lastname: String,
	Email: String,
	Phone: String,
	ImageUrl: String,
	CustomFields: 
	[
		{
			"Id": 0,
			"Name": "String",
			"Description": "String",
			"Width": 0,
			"DataType": "String",
			"DefaultValue": "String",
			"IsMandatory": false,
			"MandatoryErrorMessage": "String",
			"MaxLength": 0,
			"MultipleLineText": false,
			"RegEx": "String",
			"RegExErrorMessage": "String",
			"Values": 
			[
				{
					"Value": "String"
				}
			]
		}
	],
	CustomFieldValues: 
	[
		{
			Id: 0,
			Column: String,
			Name: String,
			Description: String,
			Value: String,
			DataType: String
		}
	],
	Comments: 
	[
		{
			Id: 0,
			Comments: String
		}
	],
	AccessKeys: 
	[
		{
			AccessKeyTypeId: 0,
			Value: String,
			Description: String
		}
	],
	ResponseStatus: {},
	SubscribedToNewsletter: False,
	InvoiceAddress: 
	{
		CorporateIdentityNumber: String,
		InvoiceAddress1: String,
		InvoiceAddress2: String,
		InvoiceCity: String,
		InvoicePostalCode: String,
		InvoiceCountryCode: String
	}
}