Lightspeed Restaurant K Series API
1.0.0

Lightspeed Restaurant offers a REST API in order to communicate with the data in the system. These APIs are built using the RESTful standards and adhere to the basic verb interactions as defined by the REST standard.

These services are in continuous development and subject to change. Find our versioning policy here.

This is the documentation for version 1.0.0 of the API. Last update on May 1, 2024.

Base URL
https://api.trial.lsk.lightspeed.app

Create Local Order

POST /o/op/1/order/local

Creates a new dine-in order for a specific business location. See Online Ordering Basics for more details.

application/json

Body Required

  • businessLocationId integer(int64) Required

    The unique identifier of the business location.

  • thirdPartyReference string Required

    The external reference provided for this order. Must be unique. This value will be included in the order details sent to the webhook URL.

    Minimum length is 1, maximum length is 48.

  • endpointId string Required

    Endpoint ID for a unique webhook that has been created using the webhook endpoint.

  • customerInfo object Required
    Hide customerInfo attributes Show customerInfo attributes
    • firstName string Required

      Customer first name.

      Minimum length is 1, maximum length is 128.

    • lastName string

      Customer last name.

    • The unique reference for this customer which can help to identify them later on. If the email is left empty, this should be empty as well.

    • email string

      The email address for this customer.

    • The customer phone number in E164 format.

    • notes string

      The notes attached to the customer.

    • Salutation for the customer (Mr., Mrs., Dr., etc...).

    • Update the customer email notification setting.

      Values are ENABLE, DISABLE, or DONT_CHANGE. Default value is DONT_CHANGE.

  • A note added to this order and displayed on the printed dockets.

  • ** Use of this feature is strongly recommended **

    Maximum time to attempt delivery of this order to the POS. In milliseconds. The minimum value is 60000ms (1 minute).

    If scheduledTimeForOrderAsIso8601 is used, this value will be added to the scheduled order time.

  • staffId integer(int64)

    The unique identifier for the staff member.

  • A valid account profile code to associate with this order. See the account profiles definition for more details.

  • The time that the order will be sent to the POS. Must be in the future.

  • payment object
    Hide payment attributes Show payment attributes
  • accountId string Deprecated

    The system-generated account identifier for this order (Applies to iKentoo V2). If this is specified, the associated order will be updated.

  • The system-generated account identifier for this order (Applies to iKentoo V3+). If this is specified, the associated order will be updated.

  • The table number for this local order. If updating an existing order, (ie.accountIdentifier is specified), the tableNumber cannot be updated.

  • clientCount integer(int32)

    The number of customers for this order. If updating an existing order, (ie.accountIdentifier is specified), the clientCount cannot be updated.

  • items array[object]

    The items in this order.

    Hide items attributes Show items attributes object
    • quantity integer(int32) Required

      Quantity of item to be ordered.

    • sku string Required

      The SKU of the item to be ordered.

      Maximum length is 25.

    • The custom name to be used, if overwriting is permitted for this item.

    • The custom price to be used, if custom pricing is permitted for this item.

    • modifiers array[object]

      Collection of modifiers to be applied to this item.

      Hide modifiers attribute Show modifiers attribute object
    • The discount code being applied to this item, if applicable.

    • course integer(int32)

      The course number for this item, if applicable.

      Minimum value is 0.

    • subItems array[object]

      The sub-items applied to this item.

      Hide subItems attributes Show subItems attributes object
      • quantity integer(int32) Required

        Quantity of sub-item to be ordered.

      • sku string Required

        The SKU of the sub-item to be ordered.

        Maximum length is 25.

      • The custom name to be used if overwriting is supported for this sub-item.

      • The custom price to be used if overwriting is supported for this sub-item.

      • modifiers array[object]

        Collection of modifiers to be applied to this sub-item.

        Hide modifiers attribute Show modifiers attribute object

Responses

  • 200 application/json

    accepted

    Hide response attribute Show response attribute object
  • 400 application/json

    Bad Request.

    Hide response attributes Show response attributes object
    • timestamp string(date-time)

      The date and time at which the error occurred.

    • status integer

      The HTTP status code of the error response.

    • error string

      A brief title of the error status.

    • message string

      A message describing the nature of the error in detail.

    • errors array[object]

      An array of error details, outlining specific issues with the request.

      Hide errors attributes Show errors attributes object
      • codes array[string]

        A set of code strings that correspond to the validation error.

      • arguments array[object]
        Hide arguments attributes Show arguments attributes object
        • codes array[string]

          Argument codes that are related to the field in validation.

        • The default message associated with the failed validation.

        • code string

          A single code that represents the specific validation rule that was not satisfied.

      • The default error message provided when the associated field fails validation.

      • The name of the object that failed validation.

      • field string

        The name of the field that failed validation.

      • Indicates whether the error was a result of a binding failure.

      • code string

        A code representing the specific type of validation error.

    • path string

      The path of the failed request.

  • 409 */*

    Conflict

    Hide response attributes Show response attributes object
    • status string

      The request status.

    • msg string

      A message describing the error.

POST /o/op/1/order/local
curl \
 -X POST https://api.trial.lsk.lightspeed.app/o/op/1/order/local \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"businessLocationId":45454565682155,"thirdPartyReference":"MyAwesomeThirdPartyReference","endpointId":"MY-AWESOME-ENDPOINT-ID","customerInfo":{"firstName":"Jane","lastName":"Doe","thirdPartyReference":"ZEN-7074522d-c71d-403f","email":"jane.doe@example.com","contactNumberAsE164":"+14155552671","notes":"Notes about the customer.","salutation":"Mr.","emailNotification":"DONT_CHANGE"},"orderNote":"Sample Order Note","maxTimeToAttemptOrderDeliverToPos":60000,"staffId":1234567890,"accountProfileCode":"LOCALORDER","scheduledTimeForOrderAsIso8601":"2024-05-04T09:42:00+00:00","payment":{"paymentMethod":"OOPAYMENT","paymentAmount":22.01,"tipAmount":2.0},"accountId":"1234567890","accountIdentifier":"A1235.89","tableNumber":"1","clientCount":4,"items":[{"quantity":2,"sku":"UGG-BB-PUR-06","customItemName":"My Custom Item Name","customItemPrice":10.0,"modifiers":[{"modifierId":"236025632784492"}],"discountCode":"FIVEPERCENT","course":2,"subItems":[{"quantity":1,"sku":"ABC-123","customItemName":"My Custom Sub-Item Name","customItemPrice":2.0,"modifiers":[{"modifierId":"236025632784492"}]}]}]}'
Request example
{
  "businessLocationId": 45454565682155,
  "thirdPartyReference": "MyAwesomeThirdPartyReference",
  "endpointId": "MY-AWESOME-ENDPOINT-ID",
  "customerInfo": {
    "firstName": "Jane",
    "lastName": "Doe",
    "thirdPartyReference": "ZEN-7074522d-c71d-403f",
    "email": "jane.doe@example.com",
    "contactNumberAsE164": "+14155552671",
    "notes": "Notes about the customer.",
    "salutation": "Mr.",
    "emailNotification": "DONT_CHANGE"
  },
  "orderNote": "Sample Order Note",
  "maxTimeToAttemptOrderDeliverToPos": 60000,
  "staffId": 1234567890,
  "accountProfileCode": "LOCALORDER",
  "scheduledTimeForOrderAsIso8601": "2024-05-04T09:42:00+00:00",
  "payment": {
    "paymentMethod": "OOPAYMENT",
    "paymentAmount": 22.01,
    "tipAmount": 2.0
  },
  "accountId": "1234567890",
  "accountIdentifier": "A1235.89",
  "tableNumber": "1",
  "clientCount": 4,
  "items": [
    {
      "quantity": 2,
      "sku": "UGG-BB-PUR-06",
      "customItemName": "My Custom Item Name",
      "customItemPrice": 10.0,
      "modifiers": [
        {
          "modifierId": "236025632784492"
        }
      ],
      "discountCode": "FIVEPERCENT",
      "course": 2,
      "subItems": [
        {
          "quantity": 1,
          "sku": "ABC-123",
          "customItemName": "My Custom Sub-Item Name",
          "customItemPrice": 2.0,
          "modifiers": [
            {
              "modifierId": "236025632784492"
            }
          ]
        }
      ]
    }
  ]
}
Response examples (200)
{
  "status": "ok"
}
Response examples (400)
{
  "timestamp": "2023-11-07T19:15:05.043+0000",
  "status": 400,
  "error": "Bad Request",
  "message": "Validation failed for object='localOrder'. Error count: 1",
  "errors": [
    {
      "codes": [
        "NotNull.localOrder.thirdPartyReference",
        "NotNull.thirdPartyReference",
        "NotNull.java.lang.String",
        "NotNull"
      ],
      "arguments": [
        {
          "codes": [
            "localOrder.thirdPartyReference",
            "thirdPartyReference"
          ],
          "defaultMessage": "thirdPartyReference",
          "code": "thirdPartyReference"
        }
      ],
      "defaultMessage": "must not be null",
      "objectName": "localOrder",
      "field": "thirdPartyReference",
      "bindingFailure": false,
      "code": "NotNull"
    }
  ],
  "path": "/o/op/1/order/local"
}
Response examples (409)
{
  "status": "fail",
  "msg": "reference has already been used 123456789"
}