Activate an order before taking payment

Changed on

Activates a draft before payment so the amount to charge is final: assigns its order number, fixes prices and VAT and stamps the sale time, then returns { id, orderNumber, order, tillPoints }, where order is the order as orders.get returns it to the caller after this activation, omitted when it could not be read, and tillPoints is what customers.tillPoints answers for it afterwards, omitted when the caller may not read that or it could not be read. An order already active is returned unchanged, so a retry is safe. Refused with BAD_REQUEST when the order is done or cancelled, or when a draft has no order type. Refused with CONFLICT and the refusal orderNotShipped for a supplier's shipment order that has not shipped yet: Ship it first. An order holding a pass without a guest attached is refused with BAD_REQUEST as passNeedsGuest before any money is taken. 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/activateForPayment

Request

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

Request body

object required
id, string required
checkoutLocationId, string

Response

OK

unknown required

Changes