↑↓select↵openescclose

Horeca24 Partner API › Orders

Create an order

POSThttps://management.horeca-24.de/api/partner/v1/orders

Checked in this order; the first problem is answered:

  1. Key (401/403), rate limit (429).
  2. JSON (400 MALFORMED_REQUEST), schema (422 INVALID_FIELD with path).
  3. Known externalId: the same payload answers 200 with duplicate: true; another payload 409 ORDER_CONFLICT.
  4. Store offline (409 STORE_OFFLINE), no webhook URL (409 WEBHOOK_NOT_CONFIGURED).
  5. Currency not the restaurant's (422 CURRENCY_MISMATCH); not checked before the restaurant's first menu sync.
  6. 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 = 0 for a pickup.
  7. Payment: cash/unpaid/amountPaid 0, or online/paid/amountPaid = total with a reference (422 INVALID_FIELD, a wrong amountPaid 422 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

AuthorizationstringRequired

Bearer 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: 1
externalIdstringRequiredpattern: ^[A-Za-z0-9._~-]{1,64}$

Your order id, unique per connection

currencystringRequiredpattern: ^[A-Z]{3}$

ISO 4217; the menu file's currency

typestringRequiredpickupdelivery
createdAtstringRequiredformat: date-time

ISO 8601 with Z or an offset

fulfillmentobjectRequired
Show child attributesHide child attributes
modestringRequiredasapscheduled
requestedAtstringOptionalformat: date-time

Pickup time for a pickup, arrival time for a delivery

courierstringOptionalstorepartner

store: the restaurant delivers; partner: your courier (enables courier updates)

customerobjectRequired
Show child attributesHide child attributes
namestringRequired1-200 chars
phonestringRequired1-50 chars
emailstringOptional0-254 charsformat: email
addressobjectAddressOptional
Show child attributesHide child attributes
streetstringRequired1-200 chars
streetNumberstringRequired1-50 chars
zipCodestringRequired1-20 chars
citystringRequired1-100 chars
countryCodestringRequiredpattern: ^[A-Z]{2}$

ISO 3166-1 alpha-2

extraAddressInfostringOptional0-500 chars
latnumberOptional-90-90
lngnumberOptional-180-180

Without lat/lng the till shows no map or distance

itemsarray of objectOrderItemRequired1-200 items
Show child attributesHide child attributes
lineIdstringRequired1-128 chars

Unique within the order

productIdstringRequired1-128 chars

The menu file's products[].id

namestringRequired1-200 chars

As the customer saw it

quantityintegerRequired1-999
unitPriceintegerRequired0-10000000

Gross

taxRatenumberRequired0-100

The line's tax rate (the menu file's taxRate); it applies to the line's modifiers too

notestringOptional0-500 chars
modifiersarray of objectOrderModifierRequired0-100 items

[] for none

Show child attributesHide child attributes
modifierGroupIdstringRequired1-128 chars

The menu file's modifierGroups[].id

modifierOptionIdstringRequired1-128 chars

The menu file's options[].id

namestringRequired1-200 chars

As the customer saw it

quantityintegerRequired1-999

Per piece of the line

unitPriceintegerRequired0-10000000

Gross

amountsobjectRequired

total = itemsSubtotal − discount + deliveryFee + serviceFee + tip

Show child attributesHide child attributes
itemsSubtotalintegerRequired0-10000000

Minor units (cents)

discountintegerRequired0-10000000

Minor units (cents)

deliveryFeeintegerRequired0-10000000

Minor units (cents)

serviceFeeintegerRequired0-10000000

Minor units (cents)

tipintegerRequired0-10000000

Minor units (cents)

totalintegerRequired0-10000000

Minor units (cents)

paymentobjectRequired

cash / unpaid / amountPaid 0 (the restaurant collects), or online / paid / amountPaid = total with a reference

Show child attributesHide child attributes
methodstringRequiredcashonline
statusstringRequiredunpaidpaid
amountPaidintegerRequired0-10000000

Minor units (cents)

referencestringOptional1-200 chars

Required for online

notestringOptional0-1000 chars
deliveryInstructionsstringOptional0-1000 chars

Response

200The same order again (same externalId, identical payload); duplicate is true
orderIdstringRequiredpattern: ^oo_[0-9a-f]{64}$

Our order id

externalIdstringRequiredpattern: ^[A-Za-z0-9._~-]{1,64}$

Your order id, unique per connection

statusstringRequiredValue: inProgress

Always inProgress; read the current status with GET /orders/{externalId}

receivedAtstringRequiredformat: date-time
duplicatebooleanRequired
201Received
orderIdstringRequiredpattern: ^oo_[0-9a-f]{64}$

Our order id

externalIdstringRequiredpattern: ^[A-Za-z0-9._~-]{1,64}$

Your order id, unique per connection

statusstringRequiredValue: inProgress

Always inProgress; read the current status with GET /orders/{externalId}

receivedAtstringRequiredformat: date-time
duplicatebooleanRequired

Errors

objectErrorBody

400

An error; see ErrorCode

401

UNAUTHORIZED: the key is missing, malformed, unknown, wrong, expired or revoked

403

CONNECTION_REVOKED: the restaurant deleted the connection; stop sending

409

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-AfterintegerOptional

Seconds to wait (REQUEST_IN_PROGRESS only)

422

An error; see ErrorCode

429

RATE_LIMITED: 60 per minute and connection, shared by orders, cancel and delivery

Headers

Retry-AfterintegerOptional

Seconds until the window ends

500

An error; see ErrorCode

503

An error; see ErrorCode