customers

Get customer reservations

This endpoint allows an agent to get reservations of a customer. The results will be filtered by agent id. Customer id in the request and reservation IDs in 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 will be a list of reservations. Each reservation has the fields explained below:

  • id: The agent-dependent unique id of the reservation
  • number: Quandoo internal identifier of the reservation.
  • quandooId: The public id of this reservation on quandoo system.
  • status: The status of the reservation eg. CREATED, CONFIRMED, CUSTOMER CANCELED etc.
  • startTime: The start time of the reservation. Format: yyyy-MM-ddTHH:mm:ssZ
  • endTime: The end time of the reservation. Format: yyyy-MM-ddTHH:mm:ssZ
  • capacity: The capacity (people count) of the reservation
  • merchantId: The ID of the merchant at which this reservation was made.
  • customerId: The public ID of the customer to which this reservation belongs
  • promoCode: The promotion code associated with this reservation. Optional.
  • extraInfo: extra information that the customer provided for the reservation. Optional.
  • links: Related links that can be followed based on this response.
  • createdAt: The date the reservation was created. Format: yyyy-MM-ddTHH:mm:ssZ
  • updatedAt: The date the reservation was last updated. Format: yyyy-MM-ddTHH:mm:ssZ

Example curl:

curl https://{host}/v{X}/customers/ce0706ff-a95d-4229-a220-d21dcd175342/reservations

Example response:

{
  "reservations": [
    {
      "id": "07f53b36-3f48-11e5-a151-feff819cdc9f",
      "number": 8734957,
      "quandooId": "07f53b36-3f48-11e5-a151-feff819cdc9f",
      "status": "CREATED",
      "startTime": "2015-06-22T12:00:00+00:00",
      "endTime": "2015-06-22T13:00:00+00:00",
      "capacity": 4,
      "merchantId": 1384,
      "customerId": "ce0706ff-a95d-4229-a220-d21dcd175342",
      "promocode": "SOME_CAMPAIGN_CODE",
      "extraInfo": "request for baby chair",
      "links": [
        {
          "href": "https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f",
          "method": "GET",
          "rel": "self"
        },
        {
          "href": "https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f",
          "method": "PATCH",
          "rel": "update"
        }
      ],
      "createdAt": "2015-06-01T15:21:54Z",
      "updatedAt": "2015-06-01T18:45:30Z"
    },
    {
      "id": "d8f53b36-3f48-11e5-a151-feff819cdc7a",
      "number": 8734958,
      "quandooId": "d8f53b36-3f48-11e5-a151-feff819cdc7a",
      "status": "CONFIRMED",
      "startTime": "2015-06-22T12:00:00+00:00",
      "endTime": "2015-06-22T13:00:00+00:00",
      "capacity": 3,
      "merchantId": 1384,
      "customerId": "ce0706ff-a95d-4229-a220-d21dcd175342",
      "promocode": "SOME_CAMPAIGN_CODE",
      "links": [
        {
          "href": "https://{host}/v{X}/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a",
          "method": "GET",
          "rel": "self"
        },
        {
          "href": "https://{host}/v{X}/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a",
          "method": "PATCH",
          "rel": "update"
        }
      ],
      "createdAt": "2015-06-01T15:21:54Z",
      "updatedAt": "2015-06-01T18:45:30Z"
    }
  ]
}
get/v1/customers/{customerId}/reservations

Path parameters

customerIdstring required

Id of the customer

Response

OK