latestSwagger 2.02026-08-172560124.6 KB

6863a5956792

reservation-enquiries

Create reservation enquiries

This endpoint allows to create a reservation enquiry for a certain capacity, start and end time. It also requires certain customer information. All optional fields can be either omitted or set to null. The endpoint is idempotent, which means sending the same request twice will not create another reservation enquiry. For that purpose the client is required to generate an agent-specific unique ID for each request.

The endpoint will return status HTTP 400 should any of the required parameters be missing or formatted incorrectly. See schema for details.

####Request: The request needs to have 3 objects: reservation enquiry, customer and tracking information.

  • reservationEnquiry: Information about the merchant and the enquiry.

    • id: The unique identifier of the reservation enquiry for the calling agent (Agent dependent field) or NULL if the agent identifier should be created. Optional.
    • merchantId: The ID of the merchant at which this enquiry will be made. Required.
    • capacity: The capacity (people count) of the reservation enquiry. Required.
    • startDateTime: The start date and time when the customer wants to make a reservation. Format: yyyy-MM-ddTHH:mm:ssZ. Required.
    • endDateTime: The expected date and time for the reservation to end accordingly to the customer. Format: yyyy-MM-ddTHH:mm:ssZ. Required.
    • message: A free-text message to the merchant. Max of 5000 characters. Required.
  • customer: Information on the customer making the reservation.

    • id: Identifier of the customer for the calling agent. Agent dependent field. Optional.
    • firstName: The first name of the customer. Optional.
    • lastName: The last name of the customer. Optional.
    • emailAddress: The email address of the customer. Required.
    • phoneNumber: The phone number of the customer. Without country code, since it will be assumed from the country field. Example: 030120765890. Required.
    • locale: The locale of the customer. E.g. de_DE. Required.
    • country: The 2 letter ISO country of the customer. E.g DE. Required
    • subscriptions: List of requested subscriptions e.g. QUANDOO, MERCHANT. Optional.
  • tracking: Third party information used to track customer and reservation enquiry.

    • agent: The id of the agent creating this reservation enquiry. Required.
    • cookie: Cookie information to be stored with this reservation. Optional.

####Response: The response returns information on the created reservation enquiry and the customer along with relevant links to follow.

  • reservationEnquiry: Information on the created reservation enquiry.

    • id: Agent-specific id set for the reservation enquiry.
  • customer: Information on the customer.

    • id: Agent-specific id set for the customer.
  • links: Related links that can be followed based on this response.

Example curl:

curl -H "Content-Type: application/json" -X POST -d '
{
  "reservationEnquiry": {
    "id": "07f53b36-3f48-11e5-a151-feff819cdc9f",
    "merchantId": 15,
    "capacity": 10,
    "startDateTime": "2015-06-22T12:00:00+00:00",
    "endDateTime": "2015-06-22T17:00:00+00:00",
    "message": "Customer specific message"
  },
  "customer": {
        "id": "659b9f4b-cd1a-4dc9-a5c3-8ef6bacbade5",
        "firstName": "Hans",
        "lastName": "Wurst",
        "emailAddress": "hans.wurst@foo.bar",
        "phoneNumber": "017312345678",
        "locale": "de_DE",
        "country": "DE",
        "subscriptions": [
          {
              "id": "QUANDOO"
          },
          {
              "id": "MERCHANT"
          }
      ]
    },
    "tracking": {
        "agent": {
          "id": 3
        },
        "cookie": {
            "tracking": "ff819cdc9",
            "referenceId": "07f53b36"
        }
    }
}' https://{host}/v{X}/reservation-enquiries

Example response:

{
  "reservationEnquiry": {
    "id": "07f53b36-3f48-11e5-a151-feff819cdc9f"
  },
  "customer": {
    "id": "2cc29cba-1e1f-4af6-8184-386e19c891ec"
  },
  "links": [
    {
      "href": "https://{host}/v{X}/merchants/15",
      "method": "GET",
      "rel": "get-merchant"
    },
    {
      "href": "https://{host}/v{X}/merchants/15/reservation-settings",
      "method": "GET",
      "rel": "reservation-settings"
    },
    {
      "href": "https://{host}/v{X}/merchants/15/availabilities",
      "method": "GET",
      "rel": "availability_days"
    },
    {
      "href": "https://{host}/v{X}/merchants/15/availabilities/2015-06-22/times",
      "method": "GET",
      "rel": "availability"
    }
  ]
}
put/v1/reservation-enquiries

Request body

Response

Reservation enquiry successfully created