Add customer
POST /api/connector/v1/customers/add
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 Body
Section titled “Request Body ”object
Token identifying the client application.
Access token of the client application.
Name and version of the client application.
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.)
First name of the customer.
Last name of the customer.
Second last name of the customer.
ISO 3166-1 code of the Country
.
Date of birth in ISO 8601 format.
Place of birth.
Occupation of the customer.
Email address of the customer.
Phone number of the customer (possibly mobile).
Loyalty code of the customer.
Internal notes about the customer.
Registration number of the customer’s car.
Customer’s dietary requirements, e.g. Vegan, Halal.
Tax identification number of the customer.
Unique identifier of Company
the customer is associated with.
Address of the customer.
object
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
Identity card details of the customer.
object
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 from which document issued
Passport details of the customer.
object
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 from which document issued
Visa details of the customer.
object
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 from which document issued
Drivers license details of the customer.
object
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 from which document issued
Classifications of the customer.
Options of the customer.
Unique identifier of the chain. Required when using PortfolioAccessTokens
, ignored otherwise.
Whether an existing customer should be overwritten in case of duplicity. This applies only to basic personal information (Title
, FirstName
, LastName
, …).
Value of Italian destination code.
Value of Italian fiscal code.
Example
{ "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0", "ChainId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "OverwriteExisting": false, "ItalianDestinationCode": "7654321", "ItalianFiscalCode": "ZGNZLR17U72P554F", "Title": "Miss", "FirstName": "Thea", "LastName": "Carbone", "BirthDate": "1985-09-30", "BirthPlace": "Pescara (BI)", "Occupation": "Giornalista", "Email": "thea@quotidiano.example", "Phone": "+39 06 555 5555", "Notes": "Check-in notturno.", "CarRegistrationNumber": "AA 111AA", "TaxIdentificationNumber": "ZGNZLR17U72P554F", "Address": { "Line1": "Via Antimo 474 Piano 5", "City": "Liborio laziale", "PostalCode": "30228", "CountryCode": "IT", "CountrySubdivisionCode": "IT-65" }, "Classifications": [ "Media", "FriendOrFamily" ], "Options": [ "SendMarketingEmails" ]}
Responses
Section titled “ Responses ”OK
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.
Example
{ "Id": "99b4f0af-9558-463b-8452-07a9bc414708", "ChainId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Number": "390881", "Title": "Miss", "Sex": null, "FirstName": "Thea", "LastName": "Carbone", "SecondLastName": null, "NationalityCode": null, "PreferredLanguageCode": null, "LanguageCode": null, "BirthDate": "1985-09-30", "BirthPlace": "Pescara (BI)", "Occupation": "Giornalista", "Email": "thea@quotidiano.example", "HasOtaEmail": false, "Phone": "+39 06 555 5555", "TaxIdentificationNumber": "ZGNZLR17U72P554F", "LoyaltyCode": null, "AccountingCode": null, "BillingCode": null, "Notes": "Check-in notturno.", "CarRegistrationNumber": "AA 111AA", "DietaryRequirements": null, "CreatedUtc": "2024-09-17T12:22:33Z", "UpdatedUtc": "2024-10-12T09:45:00Z", "Passport": null, "IdentityCard": null, "Visa": null, "DriversLicense": null, "Address": { "Id": "81f62f08-26d5-408f-9b0d-d030957dc799", "Line1": "Via Antimo 474 Piano 5", "Line2": null, "City": "Liborio laziale", "PostalCode": "30228", "CountryCode": "IT", "CountrySubdivisionCode": "IT-65", "Latitude": 28.56333, "Longitude": -121.243143 }, "AddressId": "81f62f08-26d5-408f-9b0d-d030957dc799", "Classifications": [ "Media", "FriendOrFamily" ], "Options": [], "ItalianDestinationCode": "7654321", "ItalianFiscalCode": "ZGNZLR17U72P554F", "CompanyId": "f3b4f0af-9558-463b-8452-07a9bc414708", "MergeTargetId": null, "ActivityState": null, "IsActive": true, "PreferredSpaceFeatures": [ "LowerBed" ], "CreatorProfileId": "3cd637ef-4728-47f9-8fb1-afb900c9cdcf", "UpdaterProfileId": "122fc063-ec6e-4198-b8db-6b168a59ffae"}
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.