Get all customers
POST /api/connector/v1/customers/getAll
Returns all customers filtered by identifiers, emails, names and other filters. Note this operation uses Pagination and supports Portfolio Access Tokens.
Request Body
Section titled “Request Body ”object
Token identifying the client application.
Access token of the client application.
Name and version of the client application.
Unique identifiers of the chains. Required when using Portfolio Access Tokens, ignored otherwise.
Interval in which Customer was created.
object
Interval in which Customer was updated.
object
Extent of data to be returned.
object
Whether the response should contain information about customers.
Whether the response should contain identity documents of customers.
Whether the response should contain addresses of customers.
Interval in which Customer was deleted. ActivityStates
value Deleted
should be provided with this filter to get expected results.
object
Whether to return only active, only deleted or both records.
Unique identifiers of Customers. Required if no other filter is provided.
Unique identifier of the Company the customer is associated with.
Emails of the Customers.
First names of the Customers.
Last names of the Customers.
Loyalty codes of the Customers.
Limitation on the quantity of data returned.
object
Example
{ "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 }}
Responses
Section titled “ Responses ”OK
object
The customers.
object
Unique identifier of the customer.
Unique identifier of the chain.
Number of the customer.
Title of the customer.
Mister (Mr.)
Miss (Ms.)
Misses (Mrs.)
Sex of the customer.
Male
Female
First name of the customer.
Last name of the customer.
Second last name of the customer.
ISO 3166-1 code of the Country.
Language and culture code of the customer’s preferred language, according to their profile. For example: en-GB
, fr-CA
.
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
.
Date of birth in ISO 8601 format.
Place of birth.
Occupation of the customer.
Email address of the customer.
Whether the customer’s email address is a temporary email address from an OTA. For more details, see the product documentation.
Phone number of the customer (possibly mobile).
Tax identification number of the customer.
Loyalty code of the customer.
Accounting code of the customer.
Billing code of the customer.
Internal notes about the customer.
Registration number of the customer’s car.
Customer’s dietary requirements, e.g. Vegan, Halal.
Creation date and time of the customer in UTC timezone in ISO 8601 format.
Last update date and time of the customer in UTC timezone in ISO 8601 format.
object
Unique identifier of the document.
Identifier of the Customer
.
Type of the document.
IdentityCard
Passport
Visa
DriversLicense
Number of the document (e.g. passport number).
Expiration date in ISO 8601 format.
Date of issuance in ISO 8601 format.
ISO 3166-1 code of the Country
.
City where the document was issued.
Identity document support number. Only required for Spanish identity cards in Spanish hotels.
object
Unique identifier of the document.
Identifier of the Customer
.
Type of the document.
IdentityCard
Passport
Visa
DriversLicense
Number of the document (e.g. passport number).
Expiration date in ISO 8601 format.
Date of issuance in ISO 8601 format.
ISO 3166-1 code of the Country
.
City where the document was issued.
Identity document support number. Only required for Spanish identity cards in Spanish hotels.
object
Unique identifier of the document.
Identifier of the Customer
.
Type of the document.
IdentityCard
Passport
Visa
DriversLicense
Number of the document (e.g. passport number).
Expiration date in ISO 8601 format.
Date of issuance in ISO 8601 format.
ISO 3166-1 code of the Country
.
City where the document was issued.
Identity document support number. Only required for Spanish identity cards in Spanish hotels.
object
Unique identifier of the document.
Identifier of the Customer
.
Type of the document.
IdentityCard
Passport
Visa
DriversLicense
Number of the document (e.g. passport number).
Expiration date in ISO 8601 format.
Date of issuance in ISO 8601 format.
ISO 3166-1 code of the Country
.
City where the document was issued.
Identity document support number. Only required for Spanish identity cards in Spanish hotels.
object
Unique identifier of the address.
First line of the address.
Second line of the address.
The city.
Postal code.
ISO 3166-1 code of the Country
.
ISO 3166-2 code of the administrative division, e.g. DE-BW
.
The latitude.
The longitude.
Unique identifier of the Address
of the customer.
Classifications of the customer.
Options of the customer.
Value of Italian destination code.
Value of Italian fiscal code.
Unique identifier of Company the customer is associated with.
Unique identifier of the account (Customer) to which this customer is linked.
Activity State of customer record, i.e. whether active or deleted.
Whether the customer record is still active.
A list of room preferences, such as view type, bed type, and amenities.
Unique identifier of the user who created the customer.
Unique identifier of the user who last updated the customer.
The identity documents of customers.
object
Unique identifier of the document.
Identifier of the Customer
.
Type of the document.
IdentityCard
Passport
Visa
DriversLicense
Number of the document (e.g. passport number).
Expiration date in ISO 8601 format.
Date of issuance in ISO 8601 format.
ISO 3166-1 code of the Country
.
City where the document was issued.
Identity document support number. Only required for Spanish identity cards in Spanish hotels.
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.
Example
{ "Customers": [ { "Id": "fadd5bb6-b428-45d5-94f8-fd0d89fece6d", "ChainId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Number": "12345", "Title": "Mister", "Sex": "Male", "FirstName": "John", "LastName": "Smith", "SecondLastName": "Williams", "NationalityCode": "US", "PreferredLanguageCode": "en-GB", "LanguageCode": "en-US", "BirthDate": "1983-12-31", "BirthPlace": "New York City, NY", "Occupation": "Carpenter", "Email": "j.smith@example.com", "HasOtaEmail": false, "Phone": "00420123456789", "TaxIdentificationNumber": "123456789", "LoyaltyCode": "LL810213", "AccountingCode": "AC123", "BillingCode": null, "Notes": "", "CarRegistrationNumber": "1A2 3456", "DietaryRequirements": null, "CreatedUtc": "2018-01-01T00:00:00Z", "UpdatedUtc": "2018-01-02T00:00:00Z", "Passport": null, "IdentityCard": null, "Visa": null, "DriversLicense": null, "Address": { "Id": "f8495413-bf49-45dd-843c-44be7f365569", "Line1": "Somerford Road Hello House/135", "Line2": null, "City": "Christchurch", "PostalCode": "BH23 3PY", "CountryCode": "GB", "CountrySubdivisionCode": "GB-ENG", "Latitude": null, "Longitude": null }, "AddressId": "f8495413-bf49-45dd-843c-44be7f365569", "Classifications": [ "Returning" ], "Options": [ "SendMarketingEmails" ], "ItalianDestinationCode": null, "ItalianFiscalCode": null, "CompanyId": "c6f5c82d-621a-4c8a-903b-1b0a9a23b71f", "MergeTargetId": null, "ActivityState": "Active", "IsActive": true, "PreferredSpaceFeatures": [ "OceanView" ], "CreatorProfileId": "3cd637ef-4728-47f9-8fb1-afb900c9cdcf", "UpdaterProfileId": "122fc063-ec6e-4198-b8db-6b168a59ffae" } ], "Documents": null, "Cursor": "fadd5bb6-b428-45d5-94f8-fd0d89fece6d"}
Server has successfully fulfilled the request and there is no additional information to send back.
object
Error caused by the client app, e.g. in case of malformed request or invalid identifier of a resource. In most cases, such an error signifies a bug in the client app (consumer of the API).
object
Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
object
Server error that should be reported to the end user of the client app. Happens for example when the server-side validation fails or when a business-logic check is violated.
object
Error caused by heavy request that takes too long to process (typically tens of seconds). To get around this, request data in smaller batches. For more information, see Request timeouts
object
Error caused by too many requests sent in a given amount of time. Response contains Retry-After
header indicating how long the user agent should wait before making a follow-up request. For more information, see Request limits.
object
Unexpected error on the Mews side. This may be due to a software fault. If such a situation occurs, the error will be logged and the development team notified, however you can raise an issue through GitHub on our documentation repository.