orders

Send an order to the kitchen

Changed on

Sends the order's unsent lines to the kitchen. The first send activates a draft: it assigns the order number, fixes prices and VAT at the current catalog and stamps the sale time; later sends deliver only lines added since the previous round. Kitchen tickets are created when the venue runs a kitchen display and its plan includes the Kitchen Desk (a venue whose plan lacks it while the Kitchen Desk is enforced sends like a printer-only one, never refused) and print jobs are queued when it prints. kitchenDeskOff is true when the venue switched its Kitchen Desk off, so a send that reaches no ticket there is the venue's own choice rather than a plan restriction. When there is nothing to deliver the call changes nothing and returns alreadySent true, so a retry is safe. Every reply also carries order, the order as orders.get returns it to the caller after this send, omitted when it could not be read. A pass line is stamped sent but reaches no kitchen ticket, chit or print job, so a round of passes alone mints no ticket. On a supplier's shipment order the send is Ship: it activates the order, stamps its lines sent without any kitchen ticket or print, takes their stock as a sale and opens one shipment in transit to the order's buyer location, each line valued at what it charged net of VAT, and payment follows it. A shipment order already shipped answers alreadySent true and changes nothing. When a prepared product (one with its own recipe) is held beyond on hand, the send ships nothing: it activates the order, stamps its lines sent, records one prep per short prepared product and storage of what the order holds beyond on hand, with the ingredients that prep takes beyond on hand, and, at a venue that mints kitchen tickets, routes the lines needing a prep onto the Kitchen Desk; the order carries its preps, and the send once every prep is made (Done on the Kitchen Desk, or orders.markPrepared) is Ship. Ship is refused with CONFLICT and the refusal prepsPending while a prep is not made, orderNotShippable once the order is done or cancelled, inventoryDisabled while the supplier's inventory is off, insufficientStock when a product that is not prepared is held beyond on hand, or a prep would take such a product the order itself ships beyond what is left of it (nothing is recorded or taken; the refusal lists each short product in data.shortfalls as its storageId, stockItemId, name, baseUnit, and the onHand and needed quantities in thousandths of its base unit as text), buyerLocationRequired when no buyer location is set, buyerLocationNotEligible for a location the supplier does not ship to now, and lineNotStocked when a line takes nothing from stock, as an item with no recipe does (nothing is taken); that refusal lists every such line in data.lines as its id and name. allowBeyondOnHand true, the supplier's Ship anyway, lifts insufficientStock: the short products ship below zero with shortages, as a sale takes them, and a short prepared product still gets its prep first. Refused with BAD_REQUEST when a first send finds no order type set. When checkoutLocationId names the till's venue, it is also refused before any change: with BAD_REQUEST checkoutOtherLocation for an order of another venue, CONFLICT checkoutPaymentLocked while another device's payment lock is fresh, BAD_REQUEST checkoutCancelled for a cancelled order, BAD_REQUEST checkoutClosed for an order already done, as one paid in full on another device or by the guest is, and BAD_REQUEST checkoutTypeRequired, checkoutDeliveryRequired or checkoutTableRequired for an order still missing its type, its aggregator order number, or the table its venue requires. Refused with shiftClosed once the order's shift has closed (FORBIDDEN; BAD_REQUEST when creating under it) and with FORBIDDEN notShiftParticipant for a caller not taking part in the shift. Refused with FORBIDDEN as paywallLocked when the caller is an Owner or Manager of a business the merchant Paywall locks: one with no verified subscription that has taken 5 orders while the Paywall's rollout reaches it, an order counting from its first saved line, whether or not it is paid or completed, until it is archived or cancelled before activation. Nothing is read or written; a verified subscription lifts the lock.

post/api/public/v1/orders/{id}/send

Request

  • Base URL
    https://app.fortuneos.ai
  • Auth
    none declared

Path parameters

id, string required

Request body

object required
checkoutLocationId, string
allowBeyondOnHand, boolean

Response

OK

unknown required

Changes