latestSwagger 2.02026-08-172560124.6 KB

6863a5956792

reservations

Create reservations

This endpoint allows to create a reservation for a certain capacity, date and 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. For that purpose the client is required to generate an agent-specific unique ID for the reservation.

The endpoint will return status HTTP 409 should the reservation option specified by the given parameters not be bookable anymore. 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 for reservation, customer and tracking information.

  • reservation: Information about the reservation.

    • id: The identifier of the reservation for the calling agent (Agent-dependent field). Optional.
    • merchantId: The ID of the merchant at which this reservation will be made. Required.
    • capacity: The capacity (people count) of the reservation. Required.
    • areaId: The ID of the area this reservation should be in. Optional.
    • dateTime: The date and time when the reservation will take place (local time). Format: yyyy-MM-ddTHH:mm:ss. Required
    • extraInfo: Any extra information that the customer likes to provide. Optional.
    • promoCode: A promotion code which should be used with this reservation. Optional.
    • creditCardVaultSettingsId: A credit card vault settings to be used by this reservation. Optional.
    • recurringCardDetailId:A customer credit card reference to be used if credit card vault should be applied. Optional.
    • reservationTags: A list of reservation tag IDs. Optional.
  • 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. Required
    • 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 reservations.

    • agent: The id of the agent creating this request and partner references if any. Required.
    • cookie: Cookie information to be stored with this reservation. Optional.

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

  • reservation: Information on the created reservation.

    • id: Agent-specific id set for the reservation.
    • number: Quandoo internal identifier of the reservation.
    • reservationNumber: Quandoo long internal identifier of the reservation. Provided when number is not provided.
    • status: Status for the created reservation. eg. "CREATED"
    • quandooId: Quandoo public identifier for the reservation.
  • customer: Information on the customer making the reservation.

    • 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 '
{
    "reservation": {
        "id": "07f53b36-3f48-11e5-a151-feff819cdc9f",
        "merchantId": 15,
        "capacity": 2,
        "areaId": 1,
        "dateTime": "2015-06-22T12:00:00+00:00",
        "extraInfo": "Some text",
        "promoCode": "PROMO123",
    },
    "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}/reservations

Example response:

{
    "reservation": {
        "id": "07f53b36-3f48-11e5-a151-feff819cdc9f",
        "number": 708457891,
        "status": "CREATED",
        "quandooId": "07f53b36-3f48-11e5-a151-feff819cdc9f"
    },
    "customer": {
        "id": "01a53b36-3f48-11e5-a151-feff819cdc9f"
    },
    "links": [
        {
           "href": "https://{host}/v{X}/merchants/15/reservation-settings",
           "method": "GET",
           "rel": "parent"
        },
        {
           "href": "https://{portal}/edit-reservation/overview/b8d3213a-307b-4fa9-86f7-0202ea3311aa",
           "method": "GET",
           "rel": "customer-edit-reservation"
        },
        {
           "href": "https://{portal}/de/checkout/offline-reservation?reservationId=9e1b295b-554e-4c35-bf84-e529fa971919&merchantId=test-merchant-33719&cardId=889c0613-3b42-4fc5-a1cf-bd24c1d26908",
           "method": "GET",
           "rel": "credit-card-details-page"
        }
    ]
}
put/v1/reservations

Request body

Response

OK