---
title: "Create To Go Order"
method: POST
path: "/o/op/1/order/toGo"
tags: ["Order and Pay"]
---

# Create To Go Order

`POST /o/op/1/order/toGo`

Creates a new takeaway or delivery order for a specific business location. See [Online Ordering Basics](https://api-portal.lsk.lightspeed.app/guides/tutorials/online-ordering-basics) for more details.

## Request body

- object
  - `businessLocationId` integer, required — The unique identifier for 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](https://api-docs.lsk.lightspeed.app/operation/operation-apecreatewebhookoo#operation-apecreatewebhookoo-body-application-json-url).
  - `endpointId` string, required — Endpoint id for a unique webhook that has been created using [the webhook endpoint](https://api-docs.lsk.lightspeed.app/operation/operation-apecreatewebhookoo).
  - `customerInfo` ApeCustomerInfo, required
    - `firstName` string, required — Customer first name.
    - `lastName` string — Customer last name.
    - `thirdPartyReference` string — 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.
    - `contactNumberAsE164` string — The customer phone number in E164 format.
    - `notes` string — The notes attached to the customer.
    - `salutation` string — Salutation for the customer (Mr., Mrs., Dr., etc...).
    - `sendEmailReceipts` boolean — Default value of emailNotification setting for new customers
    - `emailNotification` 'ENABLE' | 'DISABLE' | 'DONT_CHANGE' — Update the customer email notification setting. For example, sendEmailReceipts = true, emailNotification = DONT_CHANGE - sends receipt email for all users who haven't disabled it in the Backoffice. sendEmailReceipts = false, emailNotification = DONT_CHANGE - will not send receipt email for all users except those who enabled it in the Backoffice
  - `orderNote` string — A note added to this order and displayed on the printed dockets.
  - `maxTimeToAttemptOrderDeliverToPos` integer — ** 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`](https://api-docs.lsk.lightspeed.app/operation/operation-apelocalorder#operation-apelocalorder-body-application-json-scheduledtimefororderasiso8601) is used, this value will be added to the scheduled order time.
  - `staffId` integer — The unique identifier for the staff member.
  - `accountProfileCode` string — A valid order profile [code](https://api-docs.lsk.lightspeed.app/operation/operation-apeaccountprofiles#operation-apeaccountprofiles-200-body-application-json-accountprofilelist-code) to associate with this order. See the [order profiles](https://api-portal.lsk.lightspeed.app/guides/definitions/order-profiles) definition for more details.
  - `scheduledTimeForOrderAsIso8601` string, date-time — The time that the order will be sent to the POS. Must be in the future.
  - `payment` ApeOrderPayment
    - `paymentMethod` string — Payment method code as configured by the merchant.
    - `paymentAmount` number, required — The total amount of the payment including tips if any.
    - `tipAmount` number — The tip amount, if any.
  - `collectionCode` string — Unique collection code for this order. If left blank, one will be automatically generated.
  - `orderCollectionTimeAsIso8601` string, date-time — The expected collection time of the order. Must be in the future.
  - `items` ApeToGoOrderItemLine[]
    - `quantity` integer, required — Quantity of item to be ordered.
    - `sku` string, required — The SKU of the item to be ordered.
    - `customItemName` string — The custom name to be used, if overwriting is permitted for this item.
    - `customItemPrice` number — The custom price to be used, if custom pricing is permitted for this item.
    - `discountAmountOverride` number — The custom discount amount applied to this item. Only one of `discountAmountOverride` or `discountPercentOverride` can be set.
    - `discountPercentOverride` number — The custom percentage discount applied to this item. Only one of `discountAmountOverride` or `discountPercentOverride` can be set.
    - `modifiers` ApeItemModifier[] — Collection of [modifiers](https://api-docs.lsk.lightspeed.app/operation/operation-apeloadallmodifiers) to be applied to this item.
      - `modifierId` string — Modifier ID to be applied to this item.
    - `discountCode` string — The discount code being applied to this item, if applicable.
    - `subItems` ApeSubItemOrderLine[]
      - `quantity` integer, required — Quantity of sub-item to be ordered.
      - `sku` string, required — The SKU of the sub-item to be ordered.
      - `customItemName` string — The custom name to be used if overwriting is supported for this sub-item.
      - `customItemPrice` number — The custom price to be used if overwriting is supported for this sub-item.
      - `modifiers` ApeItemModifier[] — Collection of modifiers to be applied to this sub-item.
        - `modifierId` string — Modifier ID to be applied to this item.
      - `subItems` ApeSubItemOrderLine[] — Product modifiers applied to this item.
  - `deliveryAddress` object — The address to which the order should be delivered.
    - `addressLine1` string — The first line of the street address.
    - `addressLine2` string — The second line of the street address (if applicable).
    - `zip` string — The postal code for the delivery address.
    - `city` string — The city in which the delivery address is located.
  - `targetPrinterProfileId` integer — The printer profile id to use for printing the receipt for this payment. If not provided, the default active printer profile for the business location will be used.

## Response `200`

accepted

- object
  - `status` string — The response.

## Other responses

- `400` — Bad Request.
- `409` — Conflict

---

[API](https://skmtc.net/lightspeed/apis/lightspeed-restaurant-k-series-api.md) · [All operations](https://skmtc.net/lightspeed/apis/lightspeed-restaurant-k-series-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lightspeed/lightspeed-restaurant-k-series-api/revisions/fd2e31cf57dd/schema)
