Skip to main content
POST
Order preview
write:orders

Authorizations

X-Client-Id
string
header
required

Client ID for API Client authentication (must be used together with Client Secret)

X-Client-Secret
string
header
required

Client Secret for API Client authentication (must be used together with Client ID)

Body

application/json
client
object
required
dmethod
string
required

Delivery method:

  • 0 = pickup at location
  • 1 = home delivery
  • 0t = at table
  • 20 = pickup at pickup point
  • 0e-{id} = event (where {id} is the event ID)
  • dcf-{id} = custom method (where {id} is the method ID)
payment_method
enum<string>
required

Payment method:

  • cash = cash
  • invoice = invoice
  • external = externally handled
Available options:
cash,
invoice,
external
details
object[]
required

Order items (products with quantities/options)

subrestaurant_uid
string

Location identifier. Required for multi-location restaurants

language
string

ISO 639-1 language code; defaults to restaurant settings

pickup
object

Pickup data. Required for dmethod=0

delivery
object

Delivery data. Required for dmethod=1

payment_method_sub
string

Payment sub-method. Required if payment_method=cash

coupon
object

Coupon to apply to the order.

notes
string

General order notes

creator
enum<string>

Order origin:

  • customer = self-placed online order (default)
  • restaurant = phone order placed by the restaurant on behalf of the customer
Available options:
customer,
restaurant

Response

Order preview response

success
boolean
required

Operation result: true if the order is valid, false if failed

error
string

Error code if validation failed (the same codes as order creation, except those raised while submitting the order). Possible values:

  • VALIDATION_ERROR = the request data did not pass validation (missing or malformed parameters, chosen pickup/delivery time no longer available, location closed, minimum order amount not reached, ...) - see the message field for details
  • PRODUCT_NOT_FOUND = product not found
  • PRODUCT_NOT_AVAILABLE = product unavailable
  • PRODUCT_ERROR = error while adding the product to the order - see the message field for details
  • OPTION_VALUE_NOT_FOUND = option value not found
  • INVALID_ADDRESS = invalid, incomplete or not found address
  • ADDRESS_NOT_SERVED = address outside service zone
  • DELIVERY_NOT_AVAILABLE = delivery service unavailable
  • EXTERNAL_SERVICE_ERROR = the geocoding/distance external service is temporarily unavailable
  • COUPON_ERROR = coupon application error
  • SUBRESTAURANT_NOT_FOUND = location not found

See Error codes for general error codes that may also occur.

message
string

Human-readable error description if validation failed

order
object

Computed order quote (present only if success = true). No order is created.