# 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/integration-guides/online-ordering/online-ordering-basics) for more details. ## Servers - Demo URL: https://api.trial.lsk.lightspeed.app (Demo URL) - Production URL: https://api.lsk.lightspeed.app (Production URL) ## Authentication methods - O auth2 ## Parameters ## Body parameters Content-type: application/json - **businessLocationId** (integer(int64)) The unique identifier for the business location. - **thirdPartyReference** (string) 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) Endpoint id for a unique webhook that has been created using [the webhook endpoint](https://api-docs.lsk.lightspeed.app/operation/operation-apecreatewebhookoo). - **customerInfo** (object) - **orderNote** (string) A note added to this order and displayed on the printed dockets. - **maxTimeToAttemptOrderDeliverToPos** (integer(int32)) ** 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(int64)) 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** (object) - **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** (array[object]) - **deliveryAddress** (object) The address to which the order should be delivered. - **targetPrinterProfileId** (integer(int64)) 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. ## Responses ### 200: accepted #### Body Parameters: application/json (object) - **status** (string) The response. ### 400: Bad Request. #### Body Parameters: application/json (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. - **path** (string) The path of the failed request. ### 409: Conflict #### Body Parameters: */* (object) - **status** (string) The request status. - **msg** (string) A message describing the error. [Powered by Bump.sh](https://bump.sh)