latestSwagger 2.02026-08-172560124.6 KB

6863a5956792

customers

Get customer Data

This endpoint allows an agent to get customer information by id.
Customer id both in the request and response are agent-specific. The agent needs to be authenticated.

The endpoint will return HTTP 404 - Not Found if the customer with the specified id could not be found. It will return HTTP 403 - Forbidden if the agent is not authenticated or the agent doesn't have permissions.

####Request:

  • customerId: Agent-specific ID of the customer

####Response: The response contains the following data of the customer as explained below:

  • id: The agent-dependent identifier of the customer
  • email: The given email of this customer. Optional
  • firstName: First name of the customer. Optional
  • lastName: Last name of the customer. Optional
  • gender: The given gender of the customer (one of MALE, FEMALE, OTHER or UNDEFINED). Optional
  • phoneNumber: The ID of the merchant at which this reservation was made
  • mobileNumber: The ID of the customer to which this reservation belongs
  • country: 2-letter ISO country code of the customer, e.g. DE
  • links: Related links that can be followed based on this response
  • subscriptions: The newsletter subscriptions, e.g. QUANDOO, MERCHANT

Example curl:

curl https://{host}/v{X}/customers/9ffb3466-3562-42cc-add1-92a46a2f0902

Example response:

{
  "id": "9ffb3466-3562-42cc-add1-92a46a2f0902",
  "firstName": "Gaius",
  "lastName": "Octavius",
  "gender": "male",
  "email": "c2f22117-6148-45b8-ae79-41eda25eae67augustus@spqr.com",
  "phoneNumber": "+4917312345678",
  "country": "DE",  
  "links": [
    {
      "href": "http://localhost:39250/v1/customers/9ffb3466-3562-42cc-add1-92a46a2f0902/reservations",
      "method": "GET",
      "rel": "get-customer-reservations"
    }
  ],
  "subscriptions": [
    {
      "id": "QUANDOO"
    }
  ]
}
get/v1/customers/{customerId}

Path parameters

customerIdstring required

Id of the customer

Response

OK