Connector API
Search…
Customers

Get all customers

Returns all customers filtered by identifiers, emails, names and other filters.

Request

[PlatformAddress]/api/connector/v1/customers/getAll
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"CustomerIds": [
6
"35d4b117-4e60-44a3-9580-c582117eff98"
7
],
8
"Emails": [
10
],
11
"FirstNames": [
12
"John",
13
"Jane"
14
],
15
"LastNames": [
16
"Doe"
17
],
18
"LoyaltyCodes": [
19
"LL810213"
20
],
21
"CreatedUtc": {
22
"StartUtc": "2019-12-05T00:00:00Z",
23
"EndUtc": "2019-12-10T00:00:00Z"
24
},
25
"UpdatedUtc": {
26
"StartUtc": "2019-12-10T00:00:00Z",
27
"EndUtc": "2019-12-17T00:00:00Z"
28
},
29
"ActivityStates": [
30
"Active"
31
],
32
"Extent" : {
33
"Customers": "true",
34
"Documents": "true",
35
"Addresses": "false"
36
}
37
}
Copied!
Property
Type
Contract
Description
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
optional, max 1000 items
Unique identifiers of Customers. Required if no other filter is provided.
Emails
array of string
optional, max 1000 items
Emails of the Customers.
FirstNames
array of string
optional, max 1000 items
First names of the Customers.
LastNames
array of string
optional, max 1000 items
Last names of the Customers.
LoyaltyCodes
array of string
optional, max 1000 items
Loyalty codes of the Customers.
CreatedUtc
optional, max length 3 months
Interval in which Customer was created.
UpdatedUtc
optional, max length 3 months
Interval in which Customer was updated.
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 string Activity state
optional
Whether return only active, only deleted or both records.
Extent
required
Extent of data to be returned.

Time interval

Property
Type
Contract
Description
StartUtc
string
required
Start of the interval in UTC timezone in ISO 8601 format.
EndUtc
string
required
End of the interval in UTC timezone in ISO 8601 format.

Customer extent

Property
Type
Contract
Description
Customers
bool
required
Whether the response should contain information about customers.
Documents
bool
required
Whether the response should contain identity documents of customers.
Addresses
bool
required
Whether the response should contain addresses of customers.

Response

1
{
2
"Customers": [
3
{
4
"Address": {
5
"Line1": "Somerford Road Hello House/135",
6
"Line2": null,
7
"City": "Christchurch",
8
"PostalCode": "BH23 3PY",
9
"CountryCode": "GB",
10
"Latitude": null,
11
"Longitude": null
12
},
13
"BirthDate": null,
14
"BirthPlace": null,
15
"CategoryId": null,
16
"Classifications": [],
17
"CreatedUtc": "2016-01-01T00:00:00Z",
18
"Email": null,
19
"FirstName": "John",
20
"Sex": "Male",
21
"Id": "35d4b117-4e60-44a3-9580-c582117eff98",
22
"IdentityCard": null,
23
"LanguageCode": null,
24
"LastName": "Smith",
25
"LoyaltyCode": null,
26
"AccountingCode": null,
27
"BillingCode": null,
28
"NationalityCode": "US",
29
"Notes": "",
30
"Options": [],
31
"Number": "1",
32
"Phone": "00420123456789",
33
"SecondLastName": null,
34
"TaxIdentificationNumber": null,
35
"Title": null,
36
"UpdatedUtc": "2016-01-01T00:00:00Z",
37
"CompanyId": "cb7d4a2f-10e0-4163-a176-ad03007efa8a"
38
}
39
],
40
"Documents": [
41
{
42
"Id": "e8a72a69-c20b-4278-b699-ab0400a32ecc",
43
"CustomerId": "35d4b117-4e60-44a3-9580-c582117eff98",
44
"Type": "IdentityCard",
45
"Number": "123456",
46
"Expiration": "2020-01-01",
47
"Issuance": "2016-01-01",
48
"IssuingCountryCode": "CZ"
49
}
50
]
51
}
Copied!
Property
Type
Contract
Description
Customers
array of Customer
required
The customers.
Documents
array of Document
required
The identity documents of customers.

Customer

Property
Type
Contract
Description
Id
string
required
Unique identifier of the customer.
Number
string
required
Number of the customer.
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.
Title
string Title
optional
Title prefix of the customer.
Sex
string Sex
optional
Sex of the customer.
NationalityCode
string
optional
ISO 3166-1 code of the Country.
LanguageCode
string
optional
Language and culture code of the customers preferred language. E.g. en-US or fr-FR.
BirthDate
string
optional
Date of birth in ISO 8601 format.
BirthPlace
string
optional
Place of birth.
Email
string
optional
Email address of the customer.
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.
Classifications
required
Classifications of the customer.
Options
array of Customer option
required
Options of the customer.

Title

  • Mister
  • Miss
  • Misses

Sex

  • Male
  • Female

Document

Property
Type
Contract
Description
Id
string
required
Unique identifier of the document.
CustomerId
string
required
Identifier of the Customer.
Type
string Document type
required
Type of the document.
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.

Document type

  • Passport
  • IdentityCard
  • Visa
  • DriversLicense

Customer classification

  • PaymasterAccount
  • Blacklist
  • Media
  • LoyaltyProgram
  • PreviousComplaint
  • Returning
  • Staff
  • FriendOrFamily
  • TopManagement
  • Important
  • VeryImportant
  • Problematic
  • Cashlist
  • DisabledPerson
  • Military
  • ...

Customer option

  • SendMarketingEmails
  • ...

Search customers

Searches for customers that are active at the moment in the enterprise (e.g. companions of checked-in reservations or paymasters).

Request

[PlatformAddress]/api/connector/v1/customers/search
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"Name": "Smith",
6
"ResourceId": null,
7
"Extent": {
8
"Customers": true,
9
"Documents": false,
10
"Addresses": false
11
}
12
}
Copied!
Property
Type
Contract
Description
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.
Name
string
optional
Name to search by (applies to first name, last name and full name).
ResourceId
string
optional
Identifier of Resource to search by (members of Reservation assigned there will be returned).
Extent
required
Extent of data to be returned.

Response

1
{
2
"Customers": [
3
{
4
"Customer": {
5
"Address": null,
6
"BirthDate": null,
7
"BirthPlace": null,
8
"CategoryId": null,
9
"Classifications": [],
10
"CreatedUtc": "2016-01-01T00:00:00Z",
11
"Email": null,
12
"FirstName": "John",
13
"Sex": "Male",
14
"Id": "35d4b117-4e60-44a3-9580-c582117eff98",
15
"IdentityCard": null,
16
"LanguageCode": null,
17
"LastName": "Smith",
18
"LoyaltyCode": null,
19
"NationalityCode": "US",
20
"Notes": "",
21
"Number": "1",
22
"Options": [],
23
"Passport": null,
24
"Phone": "00420123456789",
25
"SecondLastName": null,
26
"TaxIdentificationNumber": null,
27
"Title": null,
28
"UpdatedUtc": "2016-01-01T00:00:00Z",
29
"Visa": null
30
},
31
"Reservation": null
32
}
33
]
34
}
Copied!
Property
Type
Contract
Description
Customers
required
The customer search results.

Customer search result

Property
Type
Contract
Description
Customer
Customer
required
The found customer.
Reservation
optional
Reservation of the customer in case he currently stays in the enterprise.

Get customers open items

Returns all open items of the specified customers, i.e. all unpaid items and all deposited payments. Sum of the open items is the balance of the customer. If the Currency is specified, costs of the items are converted to that currency.

Request

[PlatformAddress]/api/connector/v1/customers/getOpenItems
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"CustomerIds": [
6
"2a1a4315-7e6f-4131-af21-402cec59b8b9"
7
]
8
}
Copied!
Property
Type
Contract
Description
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 the Customers.
Currency
string
optional
ISO-4217 code of the Currency the item costs should be converted to.

Response

1
{
2
"Customers": [
3
{
4
"CustomerId": "2a1a4315-7e6f-4131-af21-402cec59b8b9",
5
"OrderItems": [
6
{
7
"Id": "35820535-b988-4d6f-80cf-ecb19cdc3e58",
8
"AccountId": "2a1a4315-7e6f-4131-af21-402cec59b8b9",
9
"OrderId": "6645113e-72cc-4f99-ab77-e4452911bf20",
10
"BillId": null,
11
"AccountingCategoryId": "d250149e-a29d-4c70-b607-a1759faf7320",
12
"Amount": {
13
"Currency": "GBP",
14
"NetValue": -5.00,
15
"GrossValue": -5.00,
16
"TaxValues": [
17
{
18
"Code": "UK-Z",
19
"Value": 0.0
20
}
21
],
22
"Breakdown": {
23
"Items": [
24
{
25
"TaxRateCode": "UK-Z",
26
"NetValue": -5.00,
27
"TaxValue": 0.0
28
}
29
]
30
}
31
},
32
"RevenueType": "Additional",
33
"ConsumedUtc": "2017-04-04T15:13:39Z",
34
"ClosedUtc": null,
35
"AccountingState": "Open",
36
"Data": {
37
"Discriminator": "Rebate",
38
"Value": {
39
"RebatedItemId": null
40
}
41
}
42
}
43
],
44
"PaymentItems": []
45
}
46
]
47
}
Copied!
Property
Type
Contract
Description
Customers
array of Customer items
required
The customers with their items.

Customer items

Property
Type
Contract
Description
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.

Request

[PlatformAddress]/api/connector/v1/customers/add
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"OverwriteExisting": false,
6
"FirstName": "John",
7
"LastName": "Doe",
8
"SecondLastName": "the Second",
9
"Title": "Mister",
10
"Sex": "Male",
11
"NationalityCode": "US",
12
"BirthDate": "2000-01-01",
13
"BirthPlace": "Prague, Czech Republic",
14
"Email": "[email protected]",
15
"Phone": "00420123456789",
16
"LoyaltyCode": null,
17
"Notes": null,
18
"IdentityCard": {
19
"Number": "123456",
20
"Expiration": "2020-01-01",
21
"Issuance": "2016-01-01",
22
"IssuingCountryCode": "US"
23
},
24
"Passport": null,
25
"Visa": null,
26
"DriversLicense": null,
27
"Address": {
28
"Line1": "Astronautů 2",
29
"Line2": "",
30
"City": "Havířov",
31
"PostalCode": "736 01",
32
"CountryCode": "CZ",
33
"CountrySubdivisionCode": null,
34
},
35
"ItalianDestinationCode": "1234567"
36
}
Copied!
Property
Type
Contract
Description
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.
OverwriteExisting
bool
required
Whether an existing customer should be overwritten in case of duplicity. This applies only to basic personal information (Title, FirstName, LastName, ...).
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.
Title
string Title
optional
Title prefix of the customer.
Sex
string Sex
optional
Sex of the customer.
NationalityCode
string
optional
ISO 3166-1 code of the Country.
BirthDate
string
optional
Date of birth in ISO 8601 format.
BirthPlace
string
optional
Place of birth.
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
Registration number of the customer's car.
TaxIdentificationNumber
string
optional
Tax identification number of the customer.
IdentityCard
Document
optional
Identity card details of the customer.
Passport
Document
optional
Passport details of the customer.

Address parameters

Property
Type
Contract
Description
Line1
string
optional
First line of the address.
Line2
string
optional
Second line of the address.
City
string
optional
The city.
PostalCode
string
optional
Postal code.
CountryCode
string
optional
ISO 3166-1 code of the [Countryconfiguration.md#country).
CountrySubdivisionCode
string
optional
ISO 3166-2 code of the administrative division, e.g. DE-BW.

Response

The created Customer or an existing Customer with the specified email.

Update customer

Updates personal information of a customer. Note that if any of the fields is left blank, it won't clear the field in Mews. The field will be left intact. In case of email update, the email will change in Mews only if there is no other customer profile in the hotel with such email. Otherwise an error response is returned.

Request

[PlatformAddress]/api/connector/v1/customers/update
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"CustomerId": "35d4b117-4e60-44a3-9580-c582117eff98",
6
"FirstName": "John",
7
"LastName": "Smith",
8
"SecondLastName": "the Second",
9
"Title": "Mister",
10
"Sex": "Male",
11
"NationalityCode": "US",
12
"BirthDate": "2000-01-01",
13
"BirthPlace": "Prague, Czech Republic",
14
"Email": "[email protected]",
15
"Phone": "00420123456789",
16
"LoyaltyCode": null,
17
"Notes": null,
18
"IdentityCard": {
19
"Number": "123456",
20
"Expiration": "2020-01-01",
21
"Issuance": "2016-01-01",
22
"IssuingCountryCode": "US"
23
},
24
"Passport": null,
25
"Visa": null,
26
"DriversLicense": null,
27
"ItalianDestinationCode": {
28
"Value": "7654321"
29
}
30
}
Copied!
Property
Type
Contract
Description
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.
CustomerId
string
required
Unique identifier of the Customer.
FirstName
string
optional
New first name.
LastName
string
optional
New last name.
SecondLastName
string
optional
New second last name.
Title
string Title
optional
New title.
Sex
string Sex
optional
Sex of the customer.
BirthDate
string
optional
New birth date in ISO 8601 format.
BithPlace
string
optional
New birth place.
NationalityCode
string
optional
ISO 3166-1 code of the Country.
Email
string
optional
New email address.
Phone
string
optional
New phone number.
LoyaltyCode
string
optional
Loyalty code of the customer.
Notes
string
optional
Internal notes about the customer. Old value will be overwritten.
CarRegistrationNumber
string
optional
New registration number of the customer's car.
TaxIdentificationNumber
string
optional
New tax identification number of the customer.
IdentityCard
Document
optional
New identity card details.
Passport
Document
optional
New passport details.

String update value

Property
Type
Contract
Description
Value
string
optional
Value which is to be updated.

Response

The updated Customer.

Merge customers

Merges one customer to another. All entities attached to the source customer (e.g. orders, bills) are attached to the target customer. Profile information of the target customer are extended but not overwritten with profile information of the source customer.

Request

[PlatformAddress]/api/connector/v1/customers/merge
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"SourceCustomerId": "e11801ff-4148-4010-87f3-0d111e2893e3",
6
"TargetCustomerId": "35d4b117-4e60-44a3-9580-c582117eff98"
7
}
Copied!
Property
Type
Contract
Description
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.
SourceCustomerId
string
required
Unique identifier of the source Customer.
TargetCustomerId
string
required
Unique identifier of the target Customer.

Response

1
{}
Copied!

Add customer file

Attaches the specified file to the customer profile.

Request

[PlatformAddress]/api/connector/v1/customers/addFile
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"CustomerId": "49aaff6b-32d8-48f5-8234-ce875aefc508",
6
"Name": "test.pdf",
7
"Type": "application/pdf",
8
"Data": "JVBERi0xLjcKCjEgMCBvYmogICUgZW50cnkgcG9pbnQKPDwKICAvVHlwZSAvQ2F0YWxvZwogIC9QYWdlcyAyIDAgUgo+PgplbmRvYmoKCjIgMCBvYmoKPDwKICAvVHlwZSAvUGFnZXMKICAvTWVkaWFCb3ggWyAwIDAgMjAwIDIwMCBdCiAgL0NvdW50IDEKICAvS2lkcyBbIDMgMCBSIF0KPj4KZW5kb2JqCgozIDAgb2JqCjw8CiAgL1R5cGUgL1BhZ2UKICAvUGFyZW50IDIgMCBSCiAgL1Jlc291cmNlcyA8PAogICAgL0ZvbnQgPDwKICAgICAgL0YxIDQgMCBSIAogICAgPj4KICA+PgogIC9Db250ZW50cyA1IDAgUgo+PgplbmRvYmoKCjQgMCBvYmoKPDwKICAvVHlwZSAvRm9udAogIC9TdWJ0eXBlIC9UeXBlMQogIC9CYXNlRm9udCAvVGltZXMtUm9tYW4KPj4KZW5kb2JqCgo1IDAgb2JqICAlIHBhZ2UgY29udGVudAo8PAogIC9MZW5ndGggNDQKPj4Kc3RyZWFtCkJUCjcwIDUwIFRECi9GMSAxMiBUZgooSGVsbG8sIHdvcmxkISkgVGoKRVQKZW5kc3RyZWFtCmVuZG9iagoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDEwIDAwMDAwIG4gCjAwMDAwMDAwNzkgMDAwMDAgbiAKMDAwMDAwMDE3MyAwMDAwMCBuIAowMDAwMDAwMzAxIDAwMDAwIG4gCjAwMDAwMDAzODAgMDAwMDAgbiAKdHJhaWxlcgo8PAogIC9TaXplIDYKICAvUm9vdCAxIDAgUgo+PgpzdGFydHhyZWYKNDkyCiUlRU9G"
9
}
Copied!
Property
Type
Contract
Description
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.
CustomerId
string
required
Unique identifier of the Customer.
Name
string
required
Name of the file.
Type
string
required
MIME type of the file (e.g. application/pdf).
Data
string
required
Base64-encoded data of the file.

Response

1
{}
Copied!