Start
Errors
Every error has the same shape: a machine-readable code, a short message written by the server (never by an AI model), and a reason_code when a business rule made the decision.
{
"error": {
"code": "conflict",
"message": "That pickup window is full.",
"reason_code": "window_full"
}
}Show your own copy keyed by code and reason_code; use message for logs. Retry a failed write with the same command_id and idempotency_key — a replay of an accepted command returns the original result.
HTTP statuses
| Status | Meaning |
|---|---|
400 | The request is malformed (bad JSON, a bad path or query value). |
401 | No valid credential was sent where one is required. |
403 | The caller is known but not allowed to do this (role or outlet scope). |
404 | Not found — and also the answer to a bad storefront key or guest token, so keys cannot be probed. |
409 | A conflict with the current state: an order already moved on, a full pickup window, a repeated idempotency key with a different body. |
422 | The body is well-formed but fails validation or a business rule; reason_code says which. |
Error codes (31)
The full set of error.code values in the OpenAPI file.
bad_requestunauthenticatedforbiddennot_foundconflictbook_write_refusedcountry_lockedcurrency_mismatchillegal_transitionoverride_refuseddecision_refusedcustomer_erasedcommand_table_mismatchperiod_closedbooks_unbalancedloyalty_refusedclaim_quote_mismatchout_of_pack_scopesequence_gapinvestigation_refusedidempotency_conflictcommand_type_mismatchinvalid_payloadunregistered_command_typecannot_verifyalready_decidedstale_draftchart_incompleteexecution_failedunavailableinternal
Reason codes (89)
The full set of reason_code values. The same list explains why an AI answer says "Cannot verify" (see the AI contract) — for example missing_ref or settlements_missing. Storefronts mostly meet the ordering ones: window_full, item_sold_out, outlet_paused, coupon_invalid, preview_total_changed.
number_grammarunresolved_refcross_tenant_refquote_mismatchmissing_refsettlements_missingrecipe_missingstale_draftcost_price_missingticket_times_missingcount_missingexpiry_missingbudget_exceededbudget_missingmargin_below_floormoq_exceeds_needopen_commitment_overlappayment_terms_worseconsent_record_missingbank_lines_missingattendance_missingpayroll_out_of_scopeno_marketing_consentnot_a_certificatelog_coverage_missingsignal_source_missinginsufficient_historyforecast_stalewindow_fulloutlet_pauseditem_sold_outdeal_rejudgedcoupon_invalidcoupon_cap_reachedcoupon_min_spendchange_window_closedcoupon_expiredcoupon_out_of_scopeprice_above_mrpexpired_batchperiod_closedmodel_blockedpreview_total_changedbuyer_identity_requiredtax_id_missingunknown_tax_classunknown_channelunit_mismatchnot_applicablereason_requireddeal_changedduplicate_invoiceguest_cannot_changerefund_firstorder_tenderedcash_below_roundingrecently_rejectedmode_above_ceilingcap_above_platform_budgetplatform_budget_missingassignee_missingcampaign_audience_unscopedspecialist_neededcares_not_availablecares_not_enabledcares_not_opted_incares_city_mismatchrecipient_ineligiblelisting_expiredqty_exceeds_on_handqty_exceeds_listedcooked_hold_exceededline_expiredno_eligible_recipientno_rostered_staffoffer_not_enabledoffer_closedclaim_decidedclaim_receivedrate_limitedhandover_must_be_completeoffer_handover_finalpickup_time_outside_windowtheme_contrastpage_version_staledemo_onlydemo_protected
Draft decision errors
Approving or rejecting a draft can fail with an extended body:
- errorobjectrequired
- codeenum (7)required
invalid_payloadunregistered_command_typecannot_verifyalready_decidedstale_draftidempotency_conflictexecution_failed - messagestringrequiredmin length 1max length 500
- changesarray of objectoptional
- refstringrequiredpattern ^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$
- valueone of 3 | nullrequired
- now_refstring | nullrequiredpattern ^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$
- nowone of 3 | nullrequired
- refsarray of stringoptional