Create or Update Reservation

PUT /reservation/api/1/platform/{platform-code}/restaurant/{platform-restaurant}/reservation/{platform-reservation}/push

Create a new reservation or provide updates about guests, deposits, status, etc.

Path parameters

  • platform-code string Required

    Unique code assigned to the reservation platform.

    Maximum length is 11. Format should match the following pattern: [a-zA-Z0-9_-]+.

  • platform-restaurant string Required

    External ID of platform restaurant.

    Format should match the following pattern: [a-zA-Z0-9_-]+.

  • platform-reservation string Required

    External ID of the reservation.

    Maximum length is 36. Format should match the following pattern: [a-zA-Z0-9_-]+.

application/json

Body

  • status string Required

    Values are ON_HOLD, SCHEDULED, PARTIALLY_ARRIVED, ARRIVED, PARTIALLY_SEATED, SEATED, DEPARTED, CANCELLED, NO_SHOW, or ERROR.

  • party_size integer(int32) Required

    Size of expected guests

  • guest object Required
    Hide guest attributes Show guest attributes
  • table_numbers array[string]

    List of table numbers of K-series which will occupied within guest arrived. The field is required within 'SEATED' and 'PARTIALLY_SEATED' reservation state

  • notes string

    Any information may be provided

  • Reservation obligation for the guest, deposit for serving

    Hide liability attributes Show liability attributes
    • currency string Required

      ISO-4217

      Format should match the following pattern: [A-Z]{3}.

    • deposits array[object] Required

      List of all pre-payment deposits through external platform

      Hide deposits attributes Show deposits attributes object
      • External deposit unique ID from external platform

        Format should match the following pattern: [a-zA-Z0-9_-]+.

      • amount string Required

        Deposit amount which was funded by external platform

        Format should match the following pattern: ^[0-9]+.[0-9]{2}$.

      • voided boolean

        Deposit has been voided. Used in cases when deposit transaction voided

      • utc_created_at string(date-time) Required

        Deposit creation time

      • utc_voided_at string(date-time)

        Deposit void time, when it needed

    • refunds array[object]

      List of all reimbursed deposits to the guest via financial transactions

      Hide refunds attributes Show refunds attributes object
      • External refund unique ID from external platform

        Format should match the following pattern: [a-zA-Z0-9_-]+.

      • amount string Required

        Amount which was refunded by external platform

        Format should match the following pattern: ^[0-9]+.[0-9]{2}$.

      • voided boolean

        Refund has been voided or not. Used in cases when refund transaction voided

      • utc_created_at string(date-time) Required

        Refund creation time

      • utc_voided_at string(date-time)

        Refund void time, when it needed

  • utc_scheduled_at string(date-time) Required

    Expected time of the guest

  • utc_updated_at string(date-time) Required

    Time when the reservation was changed. It must be greater than previous updates of the reservation to keep the latest version and avoid any re-ordered processes. See the 'sequence_id' field as well.

  • Monotonically increasing a value that is maintained by an external platform. It must be greater than the previous values of the reservation to keep the latest version and avoid any re-ordered processes. If the value is empty, the 'utc_updated_at' field keeps for the function.

Responses

  • 202

    Accepted

  • 400

    Non relevant request

  • 403

    Scope 'reservation-{platform-code}' not found in the token

  • 404

    Integration not found

PUT /reservation/api/1/platform/{platform-code}/restaurant/{platform-restaurant}/reservation/{platform-reservation}/push
curl \
 -X PUT https://api.trial.lsk.lightspeed.app/reservation/api/1/platform/EasyTable/restaurant/Rest-123/reservation/Re-123/push \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"status":"SCHEDULED","party_size":2,"guest":{"platform_guest_id":"ABC-123","first_name":"John","last_name":"Smith","email":"john.smit@email.com","phone":"+13453455555","walk_in":true},"table_numbers":["1"],"notes":"My birthday","liability":{"currency":"EUR","deposits":[{"platform_deposit_id":"1","amount":"100.00","voided":false,"utc_created_at":"2024-01-01T20:00:00","utc_voided_at":"2024-01-01T20:00:00"}],"refunds":[{"platform_refund_id":"1","amount":"100.00","voided":false,"utc_created_at":"2024-01-01T20:00:00","utc_voided_at":"2024-01-01T20:00:00"}]},"utc_scheduled_at":"2024-01-01T20:00:00","utc_updated_at":"2024-01-01T20:10:00","sequence_id":145789499819}'
Request example
{
  "status": "SCHEDULED",
  "party_size": 2,
  "guest": {
    "platform_guest_id": "ABC-123",
    "first_name": "John",
    "last_name": "Smith",
    "email": "john.smit@email.com",
    "phone": "+13453455555",
    "walk_in": true
  },
  "table_numbers": [
    "1"
  ],
  "notes": "My birthday",
  "liability": {
    "currency": "EUR",
    "deposits": [
      {
        "platform_deposit_id": "1",
        "amount": "100.00",
        "voided": false,
        "utc_created_at": "2024-01-01T20:00:00",
        "utc_voided_at": "2024-01-01T20:00:00"
      }
    ],
    "refunds": [
      {
        "platform_refund_id": "1",
        "amount": "100.00",
        "voided": false,
        "utc_created_at": "2024-01-01T20:00:00",
        "utc_voided_at": "2024-01-01T20:00:00"
      }
    ]
  },
  "utc_scheduled_at": "2024-01-01T20:00:00",
  "utc_updated_at": "2024-01-01T20:10:00",
  "sequence_id": 145789499819
}