# Close Order Closes a fully paid order so that it can be sent to the kitchen for fulfillment. Endpoint: PUT /v2/orders/{orderId}/close Version: v2 Security: BearerAuthSecurityScheme ## Header parameters: - `x-md-api-version` (string, required) Enum: "4" - `x-bite-location-id` (string, required) The location ID you are working with. ## Path parameters: - `orderId` (string, required) The ID of the order that's being worked on. ## Request fields (application/json): - `loyaltyAuthData` (object) Each of the properties below is required by different loyalty integrations that Bite has. The exact value of this object will be provided in the response from the /v2/orders/loyalty/auth endpoint. - `loyaltyAuthData.authToken` (string) - `loyaltyAuthData.authEntryMethod` (string) How the information connecting a guest to their loyalty account was collected. Enum: "barcode-scanned", "card-number-manually-entered", "email-manually-entered", "email-and-password-manually-entered", "email-and-phone-number-manually-entered", "email-and-phone-number-provided-externally", "phone-number-manually-entered", "phone-number-provided-externally", "redemption-code-manually-entered", "unknown-manually-entered", "username-and-password-manually-entered" - `loyaltyAuthData.tokenData` (string) - `loyaltyAuthData.tokenDataEntryMethod` (string) How the information connecting a guest to their loyalty account was collected. Enum: "barcode-scanned", "card-number-manually-entered", "email-manually-entered", "email-and-password-manually-entered", "email-and-phone-number-manually-entered", "email-and-phone-number-provided-externally", "phone-number-manually-entered", "phone-number-provided-externally", "redemption-code-manually-entered", "unknown-manually-entered", "username-and-password-manually-entered" - `loyaltyAuthData.redemptionCode` (string) - `loyaltyAuthData.redemptionCodeEntryMethod` (string) How the information connecting a guest to their loyalty account was collected. Enum: "barcode-scanned", "card-number-manually-entered", "email-manually-entered", "email-and-password-manually-entered", "email-and-phone-number-manually-entered", "email-and-phone-number-provided-externally", "phone-number-manually-entered", "phone-number-provided-externally", "redemption-code-manually-entered", "unknown-manually-entered", "username-and-password-manually-entered" - `loyaltyAuthData.customerId` (string) - `loyaltyAuthData.firstName` (string) - `loyaltyAuthData.lastName` (string) ## Response 200 fields (application/json): - `order` (object, required) - `order._id` (string, required) ID of the order (created on Bite) - `order.clientId` (string, required) ID of the order (provided by the client). Used to achieve idempotency. - `order.orgId` (string, required) The ID of the org at which the customer placed the order. - `order.locationId` (string, required) The ID of the location (in the specified org) at which the customer placed the order. - `order.startedAt` (integer, required) The Unix timestamp for when the order was started on the client. - `order.sessionDuration` (integer, required) Length of the guest session duration from the start of their ordering experience. This should be measured in milliseconds. - `order.menuStructureId` (string, required) The ID of the menu structure that was presented to the guest. - `order.selectedLanguage` (string) Denotes languages supported by the Bite platform. * en-us - English (USA) * fr-ca - French (Canada) * es-us - Spanish (USA) * zh-cn - Chinese (Simplified, PRC) * ja-jp - Japanese (Japan) * ko-kr - Korean (South Korea) * pt-br - Portuguese (Brazil) * ko-kr - Korean (South Korea) Enum: "en-us", "fr-ca", "es-us", "zh-cn", "ja-jp", "ko-kr", "pt-br" - `order.customerId` (string) ID of the customer (if they were logged in) who placed the order. Only available for non-kiosk orders. - `order.guestId` (string) ID of the recognized guest who placed the order. - `order.userDidRejectConsent` (boolean) True if the guest explicitly opted out of facial recognition on the kiosk. - `order.channel` (string, required) Denotes the ordering channel through which orders are placed: * catering - Catering Website * flash - Contactless (QR-code) * kiosk - Kiosk * linebuster - Linebuster * web - Online Ordering Website Enum: "catering", "flash", "kiosk", "linebuster", "web" - `order.fulfillmentMethod` (integer, required) The fulfillment method for this order. * Web only: * 20 - In-Store Pickup * 21 - Dine In * 22 - Curbside Pickup * 23 - Outpost * 24 - Delivery * Catering only: * 30 - In-Store Pickup * 31 - Dine In * 32 - Curbside Pickup * 33 - Outpost * 34 - Delivery - `order.pickupAt` (integer) The Unix timestamp for the ready time of a future order. ASAP orders will not have this property. If this is a pickup order, then this will denote the time by which the order is ready to be picked up from the store. If this is a delivery order, then this will denote the time by which the order should be delivered. - `order.deliveryAddress` (object) The delivery address for this order. This value is required if this is a delivery address. - `order.deliveryAddress.line1` (string, required) - `order.deliveryAddress.line2` (string) - `order.deliveryAddress.city` (string, required) - `order.deliveryAddress.state` (string) - `order.deliveryAddress.postalCode` (string, required) - `order.deliveryInstructions` (string) A short string with delivery instructions. - `order.guestName` (string) - `order.guestPhoneNumber` (string) - `order.guestEmail` (string) - `order.guestConsentedToMarketing` (boolean) - `order.guestVehicle` (object) The vehicle to which a curbside order could be delivered to. - `order.guestVehicle.make` (string, required) - `order.guestVehicle.model` (string, required) - `order.guestVehicle.color` (string, required) - `order.tableNumber` (string) Number of the table or table tent that the order is associated with. - `order.outpost` (object) The description of the outpost that this order was delivered to for the guest to pick up. This field will be present if fulfillmentMethod is an outpost one. - `order.outpost._id` (string, required) ID of the outpost. - `order.outpost.name` (string, required) The name of the outpost. - `order.outpost.pickupInstructions` (string, required) A short blurb with instructions for either finding or accessing the outpost. - `order.outpost.instructionalImageUrl` (array) An image providing some visual instructions for either finding or accessing the outpost. - `order.outpost.instructionalImageUrl.url` (string, required) Image URL - `order.outpost.instructionalImageUrl.width` (integer, required) Image width in px - `order.outpost.instructionalImageUrl.height` (integer, required) Image height in px - `order.includeUtensils` (boolean) This field will be present if the location is configured to ask the guest whether they want utensils to be included with their order. This information will then be conveyed to the POS. - `order.paymentDestination` (integer) Order Payment Destination: * Kiosk only: * 1 - Paid with card(s) on the kiosk * 3 - Paid at the cashier - `order.orderedItems` (array, required) - `order.orderedItems._id` (string, required) ID of the menu item. - `order.orderedItems.name` (string, required) Name of the menu item as it appeared on the menu. - `order.orderedItems.vendor` (object) - `order.orderedItems.vendor._id` (string, required) ID of the vendor that this menu item is associated with. - `order.orderedItems.vendor.name` (string, required) Name of the vendor that this menu item is associated with. - `order.orderedItems.scannedBarcode` (string) Value of the barcode that was scanned at the kiosk to add this menu item to the order. - `order.orderedItems.section` (object, required) The menu section section from which this menu item was ordered. - `order.orderedItems.section._id` (string, required) - `order.orderedItems.section.name` (string, required) - `order.orderedItems.specialRequest` (string) A special request that the guest added for this menu item. The max length of this field depends on the specific POS. - `order.orderedItems.upsellScreen` (string) Name of the screen from which this menu item was added to the order if it was a recommendation. - `order.orderedItems.priceOption` (object, required) The price option of the menu item that was ordered. - `order.orderedItems.priceOption._id` (string, required) ID of the ordered price option. - `order.orderedItems.priceOption.name` (string) Name of the price option as it appeared on the menu - `order.orderedItems.priceOption.quantity` (integer, required) Quantity of the menu item ordered. - `order.orderedItems.priceOption.weight` (number) - `order.orderedItems.priceOption.saleUnit` (integer) Sale unit: * 0 - single unit * 2 - pounds * 3 - ounces - `order.orderedItems.priceOption.unitPrice` (integer, required) Price of a single unit of the menu item in cents (given the ordered price option). - `order.orderedItems.priceOption.price` (integer, required) Final price of the item (in cents) that accounts for quantity but not including any priced modifiers. - `order.orderedItems.priceOption.barcode` (string) The comma separated PLUs of the menu item's price option that can be converted to a barcode (e.g. UPC-A). - `order.orderedItems.priceOption.modGroups` (array) Mod groups that were ordered with the item. - `order.orderedItems.priceOption.modGroups.name` (string, required) Name of the mod group as it appears on the menu. - `order.orderedItems.priceOption.modGroups.parentModGroupId` (string) Must be provided if the mod group had this property from the menu response. - `order.orderedItems.priceOption.modGroups.items` (array) A list of modifiers that were selected in this mod group. - `order.orderedItems.priceOption.modGroups.items._id` (string, required) ID of the modifier - `order.orderedItems.priceOption.modGroups.items.name` (string, required) Name of the modifier as it appears on the menu. - `order.orderedItems.priceOption.modGroups.deselectedItems` (array) A list of pre-selected modifiers that were deselected in this mod group. - `order.subTotal` (integer, required) The order sub total in cents. - `order.discountTotal` (integer, required) The amount discounted from the order sub total in cents. - `order.taxTotal` (integer, required) The amount of tax collected on the order in cents. - `order.serviceChargeTotal` (integer) The sum of all the service charges added to the order in cents. - `order.serviceCharges` (array) A list of all the service charges added to the order. If this property is available, then serviceChargeTotal is definitely available on the order. However, this property may not be available even if there is a serviceChargeTotal because not every POS will provide a breakdown of the service charges. - `order.serviceCharges.name` (string, required) A name of the service charge as it should appear on the receipt. - `order.serviceCharges.amount` (integer, required) The amount of the service charge in cents. - `order.tipTotal` (integer) The tip amount on the order in cents. - `order.total` (integer, required) The total amount that the guest paid in cents. This number includes the tip. - `successfulTransactions` (array, required) - `successfulTransactions._id` (string, required) ID of the transaction (created on Bite) - `successfulTransactions.clientId` (string, required) ID of the transaction (provided by the client) - `successfulTransactions.createdAt` (integer, required) The Unix timestamp for when the transaction was placed. - `successfulTransactions.orderId` (string, required) The ID of the order that this transaction covers. - `successfulTransactions.clientOrderId` (string, required) The clientId property of the order that this transaction covers. - `successfulTransactions.amount` (integer, required) - `queuePath` (string) If provided, this is the endpoint that needs to be polled to check on the status of the order after it has been closed. The queuePath will be provided if this order is ready to be sent to the POS at close time (e.g. ASAP orders as opposed to future orders). ## Response 400 fields ## Response 401 fields ## Response 403 fields ## Response 429 fields ## Response 500 fields