latestSwagger 2.02026-08-172560124.6 KB

6863a5956792

reservations

Update reservation by id

This endpoint allows an agent to update a reservation by id. The id is agent-specific. The agent needs to be authenticated. ####Request:

  • reservationId: Agent-specific ID of the requested reservation. Taken as a path parameter.

  • reservation.status: New status for the reservation. When is present then all parameters below should be omitted!

  • reservation.capacity: The capacity (people count) of the reservation.

  • reservation.areaId: The ID of the area this reservation should be in.

  • reservation.dateTime: The date and time when the reservation will take place. Format: yyyy-MM-ddTHH:mm:ssZ.

  • reservation.reservationTags list of reservation tag IDs. Null value is treated as no value.

  • reservation.extraInfo additional text information about the reservation.

    The next JSON will be treated as follows:

    • { } - extraInfo will not be updated
    • { “extraInfo”:null } - extraInfo will not be updated
    • { “extraInfo”:“some text”} - extraInfo will be updated with provided text
    • { “extraInfo”:“”} - extraInfo will be assigned an empty string

For updating status request body should contain only reservation.status. Valid status values depend on the current status of reservation and can be CUSTOMER_CANCELED or RECONFIRMED.

  • CUSTOMER_CANCELED is valid if current status is one of the below:
    • CREATED
    • CONFIRMED
    • AUTOMATIC_CONFIRMED
    • NOTIFICATION_REQUESTED
    • NOTIFIED
    • RECONFIRMED
  • MERCHANT_CANCELED is valid if current status is one of the below:
    • CONFIRMED
    • AUTOMATIC_CONFIRMED
    • NOTIFICATION_REQUESTED
    • NOTIFIED
    • RECONFIRMED
  • RECONFIRMED is valid if current status is one of the below:
    • CONFIRMED
    • AUTOMATIC_CONFIRMED
    • NOTIFICATION_REQUESTED
    • NOTIFIED

If reservation.status field is not present then reservation data will be updated and reservation's status will be reset. Depending on Automatic confirmation for online reservations setting, reservation's status will be set to CREATED or AUTOMATIC_CONFIRMED.

####Response: The endpoint will return HTTP 200 - OK if update was successful. It will return HTTP 404 - Not Found error if the reservation with the specified id could not be found. It will return HTTP 403 - Forbidden error if the agent is not authenticated, if the agent doesn't have permissions or the reservation doesn't belong to the authenticated agent. It will return HTTP 409 - Conflict error if reservation has menu, made by IOVOX, has conflict in status, time or other conflicts.

Example curl:

curl -H "Content-Type: application/json" -X PATCH -d '
{
  "reservation": {
    "status": "CUSTOMER_CANCELED"
  }
}
' https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f
patch/v1/reservations/{reservationId}

Path parameters

reservationIdstring required

Id of the reservation

Request body

Response

OK