Horeca24 Partner API › Orders
Create an order
https://management.horeca-24.de/api/partner/v1/ordersChecked in this order; the first problem is answered:
- Key (
401/403), rate limit (429). - JSON (
400 MALFORMED_REQUEST), schema (422 INVALID_FIELDwithpath). - Known
externalId: the same payload answers200withduplicate: true; another payload409 ORDER_CONFLICT. - Store offline (
409 STORE_OFFLINE), no webhook URL (409 WEBHOOK_NOT_CONFIGURED). - Currency not the restaurant's (
422 CURRENCY_MISMATCH); not checked before the restaurant's first menu sync. - Sums with your prices (
422 INVALID_AMOUNTS): line total =quantity × (unitPrice + Σ modifier.unitPrice × modifier.quantity);itemsSubtotal= Σ line totals;0 ≤ discount ≤ itemsSubtotal;total = itemsSubtotal − discount + deliveryFee + serviceFee + tip;deliveryFee = 0for a pickup. - Payment:
cash/unpaid/amountPaid 0, oronline/paid/amountPaid = totalwith areference(422 INVALID_FIELD, a wrongamountPaid422 INVALID_AMOUNTS).
Names, prices and tax rates are taken as sent. Prices are not compared with the menu, and availability is not checked: a product switched off since your copy of the menu is matched and accepted, and a line that cannot be matched (deleted since) reaches the till with your name, price and taxRate.
Headers
AuthorizationstringRequiredBearer pk_<connectionId>.<keyId>.<secret>
The connection's API key, from the restaurant's till. Treat it as one opaque string. 401 UNAUTHORIZED for a missing, wrong, expired or revoked key; 403 CONNECTION_REVOKED for the key of a deleted connection. After a rotation by the restaurant, the previous key keeps working for 24 hours.
Request
application/jsonRequired
schemaVersionstringRequiredValue: 1externalIdstringRequiredpattern: ^[A-Za-z0-9._~-]{1,64}$Your order id, unique per connection
currencystringRequiredpattern: ^[A-Z]{3}$ISO 4217; the menu file's currency
typestringRequiredpickupdeliverycreatedAtstringRequiredformat: date-timeISO 8601 with Z or an offset
fulfillmentobjectRequiredShow child attributesHide child attributes
modestringRequiredasapscheduledrequestedAtstringOptionalformat: date-timePickup time for a pickup, arrival time for a delivery
courierstringOptionalstorepartnerstore: the restaurant delivers; partner: your courier (enables courier updates)
customerobjectRequiredShow child attributesHide child attributes
namestringRequired1-200 charsphonestringRequired1-50 charsemailstringOptional0-254 charsformat: emailShow child attributesHide child attributes
streetstringRequired1-200 charsstreetNumberstringRequired1-50 charszipCodestringRequired1-20 charscitystringRequired1-100 charscountryCodestringRequiredpattern: ^[A-Z]{2}$ISO 3166-1 alpha-2
extraAddressInfostringOptional0-500 charslatnumberOptional-90-90lngnumberOptional-180-180Without lat/lng the till shows no map or distance
Show child attributesHide child attributes
lineIdstringRequired1-128 charsUnique within the order
productIdstringRequired1-128 charsThe menu file's products[].id
namestringRequired1-200 charsAs the customer saw it
quantityintegerRequired1-999unitPriceintegerRequired0-10000000Gross
taxRatenumberRequired0-100The line's tax rate (the menu file's taxRate); it applies to the line's modifiers too
notestringOptional0-500 chars[] for none
Show child attributesHide child attributes
modifierGroupIdstringRequired1-128 charsThe menu file's modifierGroups[].id
modifierOptionIdstringRequired1-128 charsThe menu file's options[].id
namestringRequired1-200 charsAs the customer saw it
quantityintegerRequired1-999Per piece of the line
unitPriceintegerRequired0-10000000Gross
amountsobjectRequiredtotal = itemsSubtotal − discount + deliveryFee + serviceFee + tip
Show child attributesHide child attributes
itemsSubtotalintegerRequired0-10000000Minor units (cents)
discountintegerRequired0-10000000Minor units (cents)
deliveryFeeintegerRequired0-10000000Minor units (cents)
serviceFeeintegerRequired0-10000000Minor units (cents)
tipintegerRequired0-10000000Minor units (cents)
totalintegerRequired0-10000000Minor units (cents)
paymentobjectRequiredcash / unpaid / amountPaid 0 (the restaurant collects), or online / paid / amountPaid = total with a reference
Show child attributesHide child attributes
methodstringRequiredcashonlinestatusstringRequiredunpaidpaidamountPaidintegerRequired0-10000000Minor units (cents)
referencestringOptional1-200 charsRequired for online
notestringOptional0-1000 charsdeliveryInstructionsstringOptional0-1000 charsResponse
externalId, identical payload); duplicate is trueorderIdstringRequiredpattern: ^oo_[0-9a-f]{64}$Our order id
externalIdstringRequiredpattern: ^[A-Za-z0-9._~-]{1,64}$Your order id, unique per connection
statusstringRequiredValue: inProgressAlways inProgress; read the current status with GET /orders/{externalId}
receivedAtstringRequiredformat: date-timeduplicatebooleanRequiredorderIdstringRequiredpattern: ^oo_[0-9a-f]{64}$Our order id
externalIdstringRequiredpattern: ^[A-Za-z0-9._~-]{1,64}$Your order id, unique per connection
statusstringRequiredValue: inProgressAlways inProgress; read the current status with GET /orders/{externalId}
receivedAtstringRequiredformat: date-timeduplicatebooleanRequiredErrors
objectErrorBody
An error; see ErrorCode
UNAUTHORIZED: the key is missing, malformed, unknown, wrong, expired or revoked
CONNECTION_REVOKED: the restaurant deleted the connection; stop sending
STORE_OFFLINE, WEBHOOK_NOT_CONFIGURED, ORDER_CONFLICT, INVALID_TRANSITION or REQUEST_IN_PROGRESS. REQUEST_IN_PROGRESS carries Retry-After (seconds); retry with the same body.
Headers
Retry-AfterintegerOptionalSeconds to wait (REQUEST_IN_PROGRESS only)
An error; see ErrorCode
RATE_LIMITED: 60 per minute and connection, shared by orders, cancel and delivery
Headers
Retry-AfterintegerOptionalSeconds until the window ends
An error; see ErrorCode
An error; see ErrorCode