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": true,
    "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
  }
}

Customer extent

Response

{
  "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": {
        "Id": "e8a72a69-c20b-4278-b699-ab0400a32ecc",
        "CustomerId": "fadd5bb6-b428-45d5-94f8-fd0d89fece6d",
        "Type": "IdentityCard",
        "Number": "123456",
        "Expiration": "2020-01-01",
        "Issuance": "2015-01-01",
        "IssuingCountryCode": "US",
        "IssuingCity": "New York City"
      },
      "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"
      ]
    }
  ],
  "Documents": [
    {
      "Id": "e8a72a69-c20b-4278-b699-ab0400a32ecc",
      "CustomerId": "fadd5bb6-b428-45d5-94f8-fd0d89fece6d",
      "Type": "IdentityCard",
      "Number": "123456",
      "Expiration": "2020-01-01",
      "Issuance": "2015-01-01",
      "IssuingCountryCode": "US",
      "IssuingCity": "New York City"
    }
  ],
  "Cursor": "fadd5bb6-b428-45d5-94f8-fd0d89fece6d"
}

Customer

Title

  • Mister

  • Miss

  • Misses

Sex

  • Male

  • Female

Identity document

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": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
  "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
  "Client": "Sample Client 1.0.0",
  "CustomerIds": [
    "2a1a4315-7e6f-4131-af21-402cec59b8b9"
  ]
}

Response

{
  "Customers": [
    {
      "CustomerId": "2a1a4315-7e6f-4131-af21-402cec59b8b9",
      "OrderItems": [
        {
          "Id": "35820535-b988-4d6f-80cf-ecb19cdc3e58",
          "AccountId": "2a1a4315-7e6f-4131-af21-402cec59b8b9",
          "OrderId": "6645113e-72cc-4f99-ab77-e4452911bf20",
          "BillId": null,
          "AccountingCategoryId": "d250149e-a29d-4c70-b607-a1759faf7320",
          "Amount": {
            "Currency": "GBP",
            "NetValue": -5,
            "GrossValue": -5,
            "TaxValues": [
              {
                "Code": "UK-Z",
                "Value": 0
              }
            ],
            "Breakdown": {
              "Items": [
                {
                  "TaxRateCode": "UK-Z",
                  "NetValue": -5,
                  "TaxValue": 0
                }
              ]
            }
          },
          "RevenueType": "Additional",
          "ConsumedUtc": "2017-04-04T15:13:39Z",
          "ClosedUtc": null,
          "AccountingState": "Open",
          "Data": {
            "Discriminator": "Rebate",
            "Value": {
              "RebatedItemId": null
            }
          }
        }
      ],
      "PaymentItems": []
    }
  ]
}

Customer items

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": "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"
  },
  "Passport": {
    "Number": "AA123456",
    "Expiration": "2030-05-20",
    "Issuance": "2020-05-20",
    "IssuingCountryCode": "IT",
    "IssuingCity": "Rome"
  },
  "Classifications": [
    "Media",
    "FriendOrFamily"
  ],
  "Options": [
    "SendMarketingEmails"
  ]
}

Sex

  • Male

  • Female

Identity document parameters

Customer classification

  • PaymasterAccount

  • Blacklist

  • Media

  • LoyaltyProgram

  • PreviousComplaint

  • Returning

  • Staff

  • FriendOrFamily

  • TopManagement

  • Important

  • VeryImportant

  • Problematic

  • Cashlist

  • DisabledPerson

  • Military

  • Airline

  • HealthCompliant

  • InRoom

  • WaitingForRoom

  • Student

Customer option

  • SendMarketingEmails

  • Invoiceable

  • BillAddressObjection

  • SendMarketingPostalMail

  • SendPartnerMarketingEmails

  • SendPartnerMarketingPostalMail

  • WithdrawCardConsent

Response

{
  "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": {
    "Id": "42c3da09-e4cb-4454-8087-6eb35bcc4bcb",
    "CustomerId": "99b4f0af-9558-463b-8452-07a9bc414708",
    "Type": "Passport",
    "Number": "AA123456",
    "Expiration": "2030-05-20",
    "Issuance": "2020-05-20",
    "IssuingCountryCode": "IT",
    "IssuingCity": "Rome"
  },
  "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"
  ]
}

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. Note this operation supports Portfolio Access Tokens.

Request

[PlatformAddress]/api/connector/v1/customers/update

{
  "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
  "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
  "Client": "Sample Client 1.0.0",
  "ChainId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "CustomerId": "99b4f0af-9558-463b-8452-07a9bc414708",
  "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",
  "CompanyId": "f3b4f0af-9558-463b-8452-07a9bc414708",
  "Address": {
    "Line1": "Via Antimo 474 Piano 5",
    "City": "Liborio laziale",
    "PostalCode": "30228",
    "CountryCode": "IT",
    "CountrySubdivisionCode": "IT-65"
  },
  "Passport": {
    "Number": "AA123456",
    "Expiration": "2030-05-20",
    "Issuance": "2020-05-20",
    "IssuingCountryCode": "IT",
    "IssuingCity": "Rome"
  },
  "Classifications": [
    "Media",
    "FriendOrFamily"
  ],
  "Options": [
    "SendMarketingEmails"
  ],
  "ItalianDestinationCode": {
    "Value": "7654321"
  },
  "ItalianFiscalCode": {
    "Value": "ZGNZLR17U72P554F"
  }
}

Response

{
  "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": {
    "Id": "42c3da09-e4cb-4454-8087-6eb35bcc4bcb",
    "CustomerId": "99b4f0af-9558-463b-8452-07a9bc414708",
    "Type": "Passport",
    "Number": "AA123456",
    "Expiration": "2030-05-20",
    "Issuance": "2020-05-20",
    "IssuingCountryCode": "IT",
    "IssuingCity": "Rome"
  },
  "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"
  ]
}

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

{
  "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
  "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
  "Client": "Sample Client 1.0.0",
  "Name": "Smith",
  "ResourceId": null,
  "Extent": {
    "Customers": true,
    "Documents": false,
    "Addresses": false
  }
}

Response

{
  "Customers": [
    {
      "Customer": {
        "Address": null,
        "BirthDate": null,
        "BirthPlace": null,
        "CategoryId": null,
        "Classifications": [],
        "CreatedUtc": "2016-01-01T00:00:00Z",
        "Email": null,
        "FirstName": "John",
        "Sex": "Male",
        "Id": "35d4b117-4e60-44a3-9580-c582117eff98",
        "IdentityCard": null,
        "LanguageCode": null,
        "LastName": "Smith",
        "LoyaltyCode": null,
        "NationalityCode": "US",
        "Notes": "",
        "Number": "1",
        "Options": [],
        "Passport": null,
        "Phone": "00420123456789",
        "SecondLastName": null,
        "TaxIdentificationNumber": null,
        "Title": null,
        "UpdatedUtc": "2016-01-01T00:00:00Z",
        "Visa": null
      },
      "Reservation": null
    }
  ]
}

Customer search result

Merge customers

Deprecated!

This operation is deprecated. Use Merge accounts instead.

Request

[PlatformAddress]/api/connector/v1/customers/merge

{
  "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
  "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
  "Client": "Sample Client 1.0.0",
  "SourceCustomerId": "e11801ff-4148-4010-87f3-0d111e2893e3",
  "TargetCustomerId": "35d4b117-4e60-44a3-9580-c582117eff98"
}

Response

{}

Add customer file

Attaches the specified file to the customer profile.

Allowed MIME types: application/pdf, image/bmp, image/gif, image/jpeg, image/png, image/tiff.

Note this operation supports Portfolio Access Tokens.

Request

[PlatformAddress]/api/connector/v1/customers/addFile

{
  "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
  "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
  "Client": "Sample Client 1.0.0",
  "CustomerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Name": "document.pdf",
  "Type": "application/pdf",
  "Data": "JVBERi0xLjAKMSAwIG9iajw8L1BhZ2VzIDIgMCBSPj5lbmRvYmogMiAwIG9iajw8L0tpZHNbMyAwIFJdL0NvdW50IDE+PmVuZG9iaiAzIDAgb2JqPDwvTWVkaWFCb3hbMCAwIDMgM10+PmVuZG9iagp0cmFpbGVyPDwvUm9vdCAxIDAgUj4+Cg==",
  "ChainId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Response

{
  "FileId": "f039f5b4-ff18-4510-9086-92b14a68ed78"
}

Last updated