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

    The 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

    The external platform ID for the restaurant.

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

  • platform-reservation string Required

    The external ID of the reservation.

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

application/json

Body

  • guest object Required

    Additional properties are allowed.

    Hide guest attributes Show guest attributes object
    • email string(email)

      The guest's email address.

    • firstName string Required

      The guest's first name.

    • lastName string

      The guest's last name.

    • phone string(phone)

      The guest's phone number.

    • platformGuestId string Required

      The external platform ID for the guest.

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

    • walkIn boolean

      When true, indicates this is a walk-in reservation.

      Default value is false.

    • Any details about food and drinks.

    • notes string

      Any details about the guest personally.

    • language string

      The language in which all notes are written, two-symbol ISO-639 codes are available.

    • allergens array[string]

      One or several guests in reservation has allergy:
      almonds, barley, brazil nuts, cashews, celery, gluten, crustacean shellfish,
      egg, fish, hazelnuts, lupin, macadamia, lactose, molluscan shellfish, nuts,
      mustard, oats, peanut, pecans, pistachios, rye, sesame, soy, sulfites, walnuts, wheat
      and other allergies for your up.

    • dietaryRestrictions array[string]

      One or several guests in reservation has dietary restriction of:
      no alcohol, pregnant, no cilantro, vegan, vegetarian, halal, gluten free,
      kosher, dairy free, pescatarian, low sodium, no red meat
      and other restrictions for your up.

  • The guest's obligation for this reservation.

    Additional properties are allowed.

    Hide liability attributes Show liability attributes object
    • currency string Required

      ISO-4217

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

    • deposits array[object] Required

      List of all prepaid deposits made through the external platform.

      Hide deposits attributes Show deposits attributes object
      • amount string Required

        The amount of the deposit made through the external platform.

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

      • The external platform ID for the deposit.

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

      • utcCreatedAt string(date-time) Required

        Deposit creation time.

      • utcVoidedAt string(date-time)

        Deposit void time, if applicable.

      • voided boolean

        Whether or not the deposit was voided.

    • refunds array[object]

      List of all deposits refunded to the guest.

      Hide refunds attributes Show refunds attributes object
      • amount string Required

        The amount which was refunded by the external platform.

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

      • The external platform ID for the refund.

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

      • utcCreatedAt string(date-time) Required

        Refund creation time.

      • utcVoidedAt string(date-time)

        Refund void time, if applicable.

      • voided boolean

        Whether or not the refund was voided.

  • notes string

    Any details about the reservation.

  • Any details about special offers.

  • tags array[string]

    This is a list of available tags, and the list is not limited, you can set any values:
    alert manager - notify the manager when guest arrives or about booking itself,
    wedding anniversary - the reservation is for a couple celebrating their wedding anniversary,
    birthday - the reservation is for a guest celebrating their birthday,
    business meal - a reservation made for a business meeting or work-related gathering,
    critic - this guest is a known food critic, requiring extra attention,
    first time - the guest is visiting the restaurant for the first time,
    complaints - the guest has previously raised complaints that should be considered,
    regular - a frequent diner who visits the restaurant regularly,
    friend employee - the guest is a personal acquaintance of an employee,
    friend owner - the guest has a personal relationship with the owner,
    high spender - the guest is known for high spending during previous visits,
    investor - the guest is an investor in the restaurant or affiliated business,
    loyalty program - the guest is a member of the restaurant’s loyalty or rewards program,
    quick service - the guest requires a fast dining experience with minimal wait times,
    romantic meal - the reservation is for a romantic occasion, such as a date,
    special occasion - the guest is celebrating a special event or milestone,
    vip - the guest is designated as a very important person, warranting extra care,
    blacklist - guest is considered to be a risk for the restuarant for a variety of potential reasons,
    positive review - the guest has previously left a positive review or feedback.

  • partySize integer(int32) Required

    The number of expected guests.

  • sequenceId integer

    An optional sequence number assigned by the external platform. If provided, it will be used to determine the order of updates of a reservation. It is the responsibility of the external platform to provide a monotonically increasing sequence number. If omitted, the utcUpdatedAt field will be used to determine the order of updates. That can be imprecise when dealing with events that happen in short timeframes in a distributed system. The value SHOULD NOT be set to null or zero or any special value, but instead omitted from the JSON object entirely if it is not used.

  • status string Required

    List of statuses of the reservations to return.

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

  • tableNumbers array[string]

    The list of table numbers associated with this reservation. The field is required when the reservation state is SEATED or PARTIALLY_SEATED.

  • utcScheduledAt string(date-time) Required

    The scheduled reservation time.

  • utcUpdatedAt string(date-time) Required

    The timestamp of the most recent change to the reservation.

Responses

  • Accepted

  • Non relevant request

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

  • 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/MyPlatform/restaurant/Restaurant-123/reservation/Reservation-123/push \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"guest":{"email":"john.smith@email.com","firstName":"John","lastName":"Smith","phone":"+13453455555","platformGuestId":"ABC-123","walkIn":true,"foodAndDrinkNotes":"Only milk and cookies!","notes":"Put the ring in the champagne!","language":"en","allergens":["almonds","egg"],"dietaryRestrictions":["no alcohol","vegan"]},"liability":{"currency":"EUR","deposits":[{"amount":"100.00","platformDepositId":"1","utcCreatedAt":"2024-01-01T20:00:00","utcVoidedAt":"2024-01-01T20:00:00","voided":false}],"refunds":[{"amount":"100.00","platformRefundId":"1","utcCreatedAt":"2024-01-01T20:00:00","utcVoidedAt":"2024-01-01T20:00:00","voided":false}]},"notes":"More balloons!","specialOffer":"Free dessert","tags":["romantic meal","special occasion"],"partySize":2,"sequenceId":145789499819,"status":"SCHEDULED","tableNumbers":["1"],"utcScheduledAt":"2024-01-01T20:00:00","utcUpdatedAt":"2024-01-01T20:10:00"}'
Request examples
{
  "guest": {
    "email": "john.smith@email.com",
    "firstName": "John",
    "lastName": "Smith",
    "phone": "+13453455555",
    "platformGuestId": "ABC-123",
    "walkIn": true,
    "foodAndDrinkNotes": "Only milk and cookies!",
    "notes": "Put the ring in the champagne!",
    "language": "en",
    "allergens": [
      "almonds",
      "egg"
    ],
    "dietaryRestrictions": [
      "no alcohol",
      "vegan"
    ]
  },
  "liability": {
    "currency": "EUR",
    "deposits": [
      {
        "amount": "100.00",
        "platformDepositId": "1",
        "utcCreatedAt": "2024-01-01T20:00:00",
        "utcVoidedAt": "2024-01-01T20:00:00",
        "voided": false
      }
    ],
    "refunds": [
      {
        "amount": "100.00",
        "platformRefundId": "1",
        "utcCreatedAt": "2024-01-01T20:00:00",
        "utcVoidedAt": "2024-01-01T20:00:00",
        "voided": false
      }
    ]
  },
  "notes": "More balloons!",
  "specialOffer": "Free dessert",
  "tags": [
    "romantic meal",
    "special occasion"
  ],
  "partySize": 2,
  "sequenceId": 145789499819,
  "status": "SCHEDULED",
  "tableNumbers": [
    "1"
  ],
  "utcScheduledAt": "2024-01-01T20:00:00",
  "utcUpdatedAt": "2024-01-01T20:10:00"
}