Customers
Get all customers
Returns all customers filtered by identifiers, emails, names and other filters. Note this operation uses Pagination and supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/customers/getAll
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ChainIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"5fcd1933-22f2-40b9-84da-7db04cbecec2"
],
"CreatedUtc": {
"StartUtc": "2018-01-01T00:00:00Z",
"EndUtc": "2018-01-30T00:00:00Z"
},
"UpdatedUtc": {
"StartUtc": "2018-01-02T00:00:00Z",
"EndUtc": "2018-01-30T00:00:00Z"
},
"Extent": {
"Customers": true,
"Documents": false,
"Addresses": false
},
"ActivityStates": [
"Active"
],
"CustomerIds": [
"fadd5bb6-b428-45d5-94f8-fd0d89fece6d"
],
"CompanyIds": [
"c6f5c82d-621a-4c8a-903b-1b0a9a23b71f"
],
"Emails": [
"j.smith@example.com"
],
"FirstNames": [
"John",
"Jane"
],
"LastNames": [
"Doe",
"Smith"
],
"LoyaltyCodes": [
"LL810213"
],
"Limitation": {
"Count": 10
}
}ClientToken
string
required
Token identifying the client application.
AccessToken
string
required
Access token of the client application.
Client
string
required
Name and version of the client application.
ChainIds
array of string
optional, max 1000 items
Unique identifiers of the chains. Required when using Portfolio Access Tokens, ignored otherwise.
DeletedUtc
optional, max length 3 months
Interval in which Customer was deleted. ActivityStates value Deleted should be provided with this filter to get expected results.
ActivityStates
array of Activity state
optional
Whether to return only active, only deleted or both records.
CustomerIds
array of string
optional, max 1000 items
Unique identifiers of Customers. Required if no other filter is provided.
CompanyIds
array of string
optional, max 1 item
Unique identifier of the Company the customer is associated with.
Customer extent
Customers
boolean
optional
Whether the response should contain information about customers.
Addresses
boolean
optional
Whether the response should contain addresses of customers.
Documents
boolean
optional
Whether the response should contain identity documents of customers. Deprecated! Use Get all identity documents instead.
Response
Cursor
string
optional
Unique identifier of the last and hence oldest customer item returned. This can be used in Limitation in a subsequent request to fetch the next batch of older customers. If Limitation is specified in the request message, then Cursor will always be included in the response message; this is true even when using Extents set to false so that no actual data is returned.
Documents
array of Identity document
optional
The identity documents of customers. Deprecated! Use Get all identity documents to fetch identity documents.
Customer
Id
string
required
Unique identifier of the customer.
ChainId
string
required
Unique identifier of the chain.
Number
string
required, max length 19 characters
Unique number of the customer (max 19 digits).
FirstName
string
optional
First name of the customer.
LastName
string
required
Last name of the customer.
SecondLastName
string
optional
Second last name of the customer.
PreferredLanguageCode
string
optional
Language and culture code of the customer's preferred language, according to their profile. For example: en-GB, fr-CA.
LanguageCode
string
optional
Language and culture code of the customer's language, based on multiple sources. These sources include the preferred language specified in internal data based on previous bookings, and the preferred language of the customer specified in their profile. If neither of these sources are present, we use the native language based on the customer's nationality. The format is, for example, en-US or fr-FR.
BirthDate
string
optional
Date of birth in ISO 8601 format.
BirthCountryCode
string
optional
ISO 3166-1 alpha-2 code of the birth country.
BirthCountrySubdivisionCode
string
optional
ISO 3166-2 code of the administrative division, e.g. ES-C.
BirthPlace
string
optional
Place of birth.
Occupation
string
optional
Occupation of the customer.
Email
string
optional
Email address of the customer.
HasOtaEmail
boolean
required
Whether the customer's email address is a temporary email address from an OTA. For more details, see the product documentation.
Phone
string
optional
Phone number of the customer (possibly mobile).
TaxIdentificationNumber
string
optional
Tax identification number of the customer.
LoyaltyCode
string
optional
Loyalty code of the customer.
AccountingCode
string
optional
Accounting code of the customer.
BillingCode
string
optional
Billing code of the customer.
Notes
string
optional
Internal notes about the customer.
CarRegistrationNumber
string
optional, max length 255 characters
Registration number of the customer's car.
DietaryRequirements
string
optional, max length 255 characters
Customer's dietary requirements, e.g. Vegan, Halal.
CreatedUtc
string
required
Creation date and time of the customer in UTC timezone in ISO 8601 format.
UpdatedUtc
string
required
Last update date and time of the customer in UTC timezone in ISO 8601 format.
AddressId
string
optional
Unique identifier of the Address of the customer.
ItalianDestinationCode
string
optional
Value of Italian destination code.
ItalianFiscalCode
string
optional
Value of Italian fiscal code.
ItalianLotteryCode
string
optional
Italian lottery code.
MergeTargetId
string
optional
Unique identifier of the account (Customer) to which this customer is linked.
IsActive
boolean
required
Whether the customer record is still active.
PreferredSpaceFeatures
array of Resource feature classification
required
A list of room preferences, such as view type, bed type, and amenities.
CreatorProfileId
string
required
Unique identifier of the user who created the customer.
UpdaterProfileId
string
required
Unique identifier of the user who last updated the customer.
ActivityState
string
optional
Activity State of customer record, i.e. whether active or deleted. Deprecated! Use IsActive instead.
Title
Type of the title prefix of the customer.
Note that the value should not be used as-is, but localized. For example, the value Misses should be displayed as Mrs. in English and Fr. in German.
Mister- Mr.Miss- Ms.Misses- Mrs.
Sex
MaleFemale
Identity document
Id
string
required
Unique identifier of the document.
CustomerId
string
required
Identifier of the Customer.
Number
string
optional
Number of the document (e.g. passport number).
Expiration
string
optional
Expiration date in ISO 8601 format.
Issuance
string
optional
Date of issuance in ISO 8601 format.
IssuingCountryCode
string
optional
ISO 3166-1 code of the Country.
IssuingCountrySubdivisionCode
string
optional
Identifier of the country subdivision where the document was issued (province, state or region).
IssuingCity
string
optional
City where the document was issued.
IdentityDocumentSupportNumber
string
optional
Identity document support number. Only required for Spanish identity cards in Spanish hotels.
Customer classification
PaymasterAccountBlacklist- Deprecated, use Blocklist instead.MediaLoyaltyProgramPreviousComplaintReturningStaffFriendOrFamilyTopManagementImportantVeryImportantProblematicCashlistDisabledPersonMilitaryAirlineHealthCompliantInRoomWaitingForRoomStudentBlocklist
Customer option
NoneSendMarketingEmailsInvoiceableBillAddressObjectionSendMarketingPostalMailSendPartnerMarketingEmailsSendPartnerMarketingPostalMailWithdrawCardConsentGuestPhotoConsentIdPhotosConsent
Get customers relationships
Restricted!This operation is currently in beta-test and as such it is subject to change.
Returns relationships between customers (e.g. Spouse, Friend) for the provided unique identifiers of customers.
Request
[PlatformAddress]/api/connector/v1/customers/getRelationships
ClientToken
string
required
Token identifying the client application.
AccessToken
string
required
Access token of the client application.
Client
string
required
Name and version of the client application.
ChainIds
array of string
optional, max 1000 items
Unique identifiers of Chain. If not specified, the operation returns data for all chains within scope of the Access Token.
CustomerIds
array of string
required, max 100 items
Unique identifiers of Customer.
Limitation
required
Limitation on the quantity of data returned and optional Cursor for the starting point of data.
Response
Cursor
string
optional
Unique identifier of the item one newer in time order than the items to be returned. If Cursor is not specified, i.e. null, then the latest or most recent items will be returned.
CustomerRelationship
CustomerId
string
required
Unique identifier of the customer in the relationship.
RelatedCustomerId
string
required
Unique identifier of the related customer.
Relationship
required
Type of relationship between the two customers (e.g. Child = the related customer is the child of this customer).
Customer relationship type
Note the list of values is not exhaustive. The API may return additional values that are not listed here.
SpouseChildParentOtherFamily- Any familial relationship that doesn't fit for the options providedFriendColleagueOther…
Get customers open items
Deprecated!This operation is deprecated. Use Get all payments and Get all order items instead.
Request
[PlatformAddress]/api/connector/v1/customers/getOpenItems
ClientToken
string
required
Token identifying the client application.
AccessToken
string
required
Access token of the client application.
Client
string
required
Name and version of the client application.
CustomerIds
array of string
required, max 1000 items
Unique identifiers of Customer.
Response
Customer items
CustomerId
string
required
Unique identifier of the Customer.
OrderItems
array of Order item
required
The open order items (consumed items such as nights or products).
PaymentItems
array of Payment item
required
The open payment items (such as cash, credit card payments or invoices).
Add customer
Adds a new customer to the system and returns details of the added customer. If a customer with the specified email already exists, and OverwriteExisting is set to true, then the existing customer profile information is overwritten and the existing customer data returned. If OverwriteExisting is set to false, an error response is returned. Note this operation supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/customers/add
ClientToken
string
required
Token identifying the client application.
AccessToken
string
required
Access token of the client application.
Client
string
required
Name and version of the client application.
FirstName
string
optional
First name of the customer.
LastName
string
required
Last name of the customer.
SecondLastName
string
optional
Second last name of the customer.
NationalityCode
string
optional
ISO 3166-1 code of the Country.
PreferredLanguageCode
string
optional
Language and culture code of the customer's preferred language, according to their profile. For example: en-GB, fr-CA.
BirthDate
string
optional
Date of birth in ISO 8601 format.
BirthCountryCode
string
optional
Country of birth.
BirthCountrySubdivisionCode
string
optional
Province of birth.
BirthPlace
string
optional
Place of birth.
Occupation
string
optional
Occupation of the customer.
Email
string
optional
Email address of the customer.
Phone
string
optional
Phone number of the customer (possibly mobile).
LoyaltyCode
string
optional
Loyalty code of the customer.
Notes
string
optional
Internal notes about the customer.
CarRegistrationNumber
string
optional, max length 255 characters
Registration number of the customer's car.
DietaryRequirements
string
optional, max length 255 characters
Customer's dietary requirements, e.g. Vegan, Halal.
TaxIdentificationNumber
string
optional
Tax identification number of the customer.
CompanyId
string
optional
Unique identifier of Company the customer is associated with.
ChainId
string
optional
Unique identifier of the chain. Required when using PortfolioAccessTokens, ignored otherwise.
OverwriteExisting
boolean
required
Whether an existing customer should be overwritten in case of duplicity. This applies only to basic personal information (Title, FirstName, LastName, ...).
ItalianDestinationCode
string
optional
Value of Italian destination code.
ItalianFiscalCode
string
optional
Value of Italian fiscal code.
ItalianLotteryCode
string
optional, max length 15 characters
Value of Italian lottery code.
IdentityCard
optional
Identity card details of the customer. Deprecated! Use Add identity documents to add document.
Passport
optional
Passport details of the customer. Deprecated! Use Add identity documents to add document.
DriversLicense
optional
Drivers license details of the customer. Deprecated! Use Add identity documents to add document.
Sex
MaleFemale
Identity document parameters
Number
string
optional
Number of the document (e.g. passport number).
Expiration
string
optional
Expiration date in ISO 8601 format.
Issuance
string
optional
Date of issuance in ISO 8601 format.
IssuingCountryCode
string
optional
ISO 3166-1 code of the Country.
IssuingCountrySubdivisionCode
string
optional
Identifier of the country subdivision where the document was issued (province, state or region).
IssuingCity
string
optional
City from which document issued
Customer option
SendMarketingEmailsInvoiceableBillAddressObjectionSendMarketingPostalMailSendPartnerMarketingEmailsSendPartnerMarketingPostalMailWithdrawCardConsent