X-Timestamp: Unix time in seconds or milliseconds (within 5 minutes of server time)
X-Signature: Base64-encoded HMAC signature
Example (Node.js):
🔄 Idempotency Protection
Include Idempotency-Key header to prevent duplicate orders on retry.
A replay with the same key and body returns the original order (200) and creates no second order.
⚠️ Security Notes:
HMAC secret is displayed in the Integrations page (Developer section)
Never expose HMAC secret in client-side code
Regenerate secret immediately if compromised
Requests with invalid/missing signatures return 401 Unauthorized
Timestamps older than 5 minutes are rejected to prevent replay attacks
Orders with nothing to ship
An order whose items are all downloads, codes, event tickets or services needs no delivery address
and is quoted no delivery charge. The method is derived from the items (fulfillment_methodnone),
so shipping_address can be left out and shipping_amount is 0. A mixed basket is quoted for its
shipped items only. Each item’s kind is stored on the line as fulfilment_kind, and the delivery of
each purchased unit is tracked after payment.
Billing location. Because nothing ships, billing_address.country_code and
billing_address.postal_code decide the tax; without them the order is refused with
400 billing_location_required.
Event tickets. Checkout refuses a ticket whose sale has not opened or has closed
(409 ticket_sale_closed), an event that has ended (409 ticket_event_ended), more units than
max_per_order (400 ticket_limit_exceeded) and a sold-out ticket type or full venue
(409 insufficient_stock). 409 not_available marks an item that can no longer be sold by the
store. items[].attendee_names names the people on group tickets.
Line fields.items[].custom_fields answers the merchant’s fields for the line. A required
field that is empty on an event ticket or a code is refused with 400 line_field_required, with
details.item_index and details.field_name.
Free orders. A zero-total order of downloads and event tickets is created paid with
payment_methodfree, for a signed-in shopper identified by x-auth-token,
x-external-auth or a customer_id linked to a shopper account. Otherwise it is refused with
409 account_required.
🛡️ Server-side price validation (anti-tampering)
HMAC proves the body wasn’t altered in transit; it does not prove the amounts are honest.
So the server independently recomputes the order from authoritative data and rejects any
mismatch — you cannot set your own prices or discounts:
Item prices are recomputed from the live catalog. The catalog price of a line is the
variant’s online sale price when one applies, otherwise its online price (its in-store price
when no online price is set). unit_price / total_price that don’t
match the catalog price → 400 price_mismatch. (The stored order always uses the catalog
price, never the value you send.)
subtotal, tax_amount, total_amount must reconcile to subtotal + tax + shipping − discount over those catalog prices → otherwise 400 price_mismatch.
tax_amount is calculated by the server when you omit it: for the shipping_address when
the store has automatic tax (the shipping charge is rated as its own line), otherwise at the
store’s own rate — on the line totals, plus the shipping charge when the store charges tax on
shipping. At the store’s own rate a tax_amount you send must match that figure to the cent →
otherwise 400 price_mismatch. When the store’s prices include tax, the tax is taken from
what the shopper pays (line totals − discount, plus shipping when taxed) and subtotal is the
line totals minus that tax. POST /v1/tax/preview returns the same figure before checkout.
discount_amount is validated against the discount the promotions / gift card you claim
actually grant (computed server-side from promotion_usages + gift_card_redemption). A
discount_amount greater than that legitimate maximum → 400 discount_invalid. A discount
with no real promotion/gift card behind it → max is 0. (You may apply less than the maximum.)
shipping_amount is checked on every order, $0 included, and may not be negative:
With a carrier option (shipping_rate_id + shipping_rate_source, or shippo_rate_id),
the option is fetched again from its source — the store’s carrier account, or its custom
shipping extension re-quoted for shipping_address and shipping_parcel. An unknown,
expired or foreign option, one in another currency, or a test-mode option on a live order →
400 shipping_rate_invalid; an amount that differs from the option →
400 price_mismatch.
Otherwise, when the store has delivery rates and the destination is known
(shipping_latitude/shipping_longitude, or a shipping_address that can be located), the
amount must equal the store’s charge for that address, free-delivery thresholds measured
against the line totals after discount_amount → otherwise 400 price_mismatch. A
destination the store does not deliver to → 400 shipping_not_deliverable.
With a named delivery option (shipping_option_id of the form opt:<id>), the amount must
equal that option’s fee for the address and basket → otherwise 400 price_mismatch. An
option the order does not qualify for → 400 shipping_option_unavailable.
On a pickup order (fulfillment_method: pickup), the amount must equal the location’s pickup
fee → otherwise 400 price_mismatch. A location that is not one of the store’s pickup
locations, or an order below its minimum → 400 pickup_unavailable. Tax is calculated
at the pickup location.
A store with no delivery rates (it ships through its own arrangements) accepts the amount
sent; so does an order whose destination cannot be located. Such an order is recorded as
not checked.
When shipping cannot be checked because the service is unreachable →
502 shipping_unavailable; the order is not created.
In short: send the real catalog prices and the actual promotions/gift card the shopper is
entitled to. Don’t compute or invent prices/discounts client-side — the server is the authority.
Format: tybrite_sk_live_* (production) or tybrite_sk_test_* (sandbox)
Full read/write access to all endpoints
⚠️ NEVER expose in client-side code or public repositories
Required for: every write a shopper does not make for themselves, authentication, payment verification, AI recommendations
Publishable Keys (Client-Safe):
Format: tybrite_pk_live_* (production) or tybrite_pk_test_* (sandbox)
Catalogue reads, plus the actions a shopper takes for themselves
✅ Safe for client-side JavaScript, mobile apps, and public code
Allowed for: browsing products, search, CMS content, pricing queries, cart and wishlist,
reviews, storefront events, and the Agent API's quotes, cart drafts and checkout intents
Endpoint-Specific Requirements:
Authentication endpoints (/v1/auth/*): state-changing POST calls require a secret key, for store and marketplace keys alike; GET /v1/auth/me accepts either key
AI Recommendations (POST /v1/recommendations): Secret key required
Semantic Search (POST /v1/search): Both key types allowed (read-only operation)
Shopper actions (cart, wishlist, reviews, storefront events, Agent API quotes, cart drafts and checkout intents): Both key types allowed
All other write operations: Secret key required
All read operations: Both key types allowed
Using a publishable key for restricted operations returns 403 Forbidden.
Limited publishable keys:
A publishable key can be limited to the products that carry one tag (for example starter:jewellery), created from
the store's Developers page. The limit applies to the key, never to the shopper: shopper sign-up and sign-in stay store-wide.
Reads return only the slice: products (with their facets, filters, search, brands and specifications), categories and
subcategories that hold in-slice products, collections, promotions, posts and lookbooks that carry the tag, reviews of
in-slice products, prices, discovery lists and the store information summary, with every count computed on the slice.
A product outside the slice answers 404, as if it did not exist.
A write that names a product or variant outside the slice (adding to the cart or wishlist, reserving stock, an order line,
a review, a promotion calculation, a storefront event) answers 403 with the error code out_of_scope, and nothing is
written or reserved. An order is refused as a whole.
A route that carries no slice behaviour is not available to the key: it answers 403 with endpoint_not_allowed.
Orders placed through such a key record the tag on the order's attribution as key_scope.
Secret keys and connected-app keys cannot be limited.
Responses are cached per key limit: a limited key never receives a response cached for the whole store, and the reverse.
Headers
Idempotency-Key
string
required
Unique key to prevent duplicate orders (e.g., order-{timestamp}-{random})
X-Timestamp
integer
required
Unix time in seconds or milliseconds, within 5 minutes of server time.
Used to prevent replay attacks.
X-Signature
string
required
HMAC-SHA256 signature of the payload (timestamp + "." + request_body), base64-encoded.
Sign using your HMAC secret from the Integrations page (Developer section).
x-auth-token
string
The signed-in shopper's session token. Identifies the buyer of a free order (total_amount 0), which is created for a signed-in shopper only. The shopper must be the order's customer_id when one is sent. Send at most one shopper credential.
x-external-auth
string
A shopper assertion signed with the store's signing secret, for stores that run their own sign-in: external_id, iat and exp (at most 300 seconds apart). Identifies the buyer of a free order like x-auth-token. Send at most one shopper credential; sending more than one returns 400.
x-idp-token
string
A raw token from the store's own identity provider, verified through the store's Auth verifier (fail-closed: a rejected or unreachable verifier is 401). Identifies the buyer of a free order like x-auth-token. Send at most one shopper credential.
Body
application/json
customer_email
string<email>
required
Customer email address. Required.
Example:
"john.doe@example.com"
customer_name
string
required
Customer full name. Required.
Example:
"John Doe"
billing_address
object
required
Billing address. Required. On an order with nothing to ship (fulfillment_methodnone) it is the tax destination, so country_code (two letters) and postal_code are required, and the store may also ask for street and city; a request without them is refused with 400 billing_location_required.
Show child attributes
items
object[]
required
Order line items (at least one, at most 100)
Required array length: 1 - 100 elements
Provide variant_id OR product_id (at least one). Prefer variant_id — it is the exact variant (SKU) the shopper chose, so pass the same variant_id you put in the cart straight through to the order. If you send only product_id, the order is placed against the product's default variant — convenient for single-variant products, but for a product with multiple variants it may not be the one the shopper selected. When both are sent, variant_id wins (and product_id is resolved from it).
Option 1
Option 2
Show child attributes
payment_method
string
required
Payment method identifier (required): one of card, stripe, paypal, paystack, mpesa, mpesa_c2b, cash, bank_transfer, free, or the identifier of one of the store's own payment providers as listed by GET /v1/payments/methods. On a live key the order may name only a method the store has switched on (card and free aside); any other value answers 400 with the list the store accepts. A test key is not held to the store's switches. free is for an order whose total_amount is 0 and whose items are all downloads or event tickets; the order is created paid, for a signed-in shopper (see x-auth-token). It may be omitted on such an order. Any other zero-total order is refused.
Example:
"card"
subtotal
number<float>
required
Subtotal before tax and shipping. Required.
Example:
2000
total_amount
number<float>
required
Total order amount (required)
Example:
2520
customer_id
string<uuid>
Customer UUID. Optional: an order without one is a guest checkout. Required when subscribe_save is sent, because a subscription belongs to a signed-in shopper.
Example:
"c320094c-eb65-4879-804c-83d2e1dd7f99"
customer_phone
string
Customer phone number (optional)
Example:
"+14155550199"
shipping_address
object
Shipping address. Required for a delivery order. On a pickup order it is not needed: the collection location's address is stored as the order's shipping address, with type: pickup. It is not needed either when nothing in the order ships, and none is stored.
Show child attributes
payment_status
enum<string>
Payment status on create (defaults to pending). Only pending and paid are accepted; later states are reached by PATCH /v1/orders/{id}. An order created as paid needs the payment_reference of the payment that settled it (counter-settled cash and card, and a free order, are exempt); without it the call answers 400 payment_reference_required.
Available options:
pending,
paid
Example:
"pending"
order_status
enum<string>
Order status on create (defaults to pending). Only pending, confirmed and processing are accepted; later states are reached by PATCH /v1/orders/{id}.
Available options:
pending,
confirmed,
processing
Example:
"pending"
tax_amount
number<float>
Tax amount
Example:
320
shipping_amount
number<float>
Shipping cost
Example:
200
discount_amount
number<float>
Discount amount
Example:
0
notes
string
Additional order notes
Example:
"Please deliver between 9 AM - 5 PM"
tracking_number
string
Shipping tracking number (optional, usually set on PATCH)
Values for the merchant's own custom fields on this order, as
{ field_name: value }. Use this to carry a reference the merchant asked for at
checkout — a buyer's purchase-order number, a cost centre, a delivery instruction.
Each value is validated against the merchant's definition: a name that is not defined,
a value outside a select field's options, or a number that will not parse is
rejected. A rejected field does not fail the order — the order is created and
the reason is returned in post_processing_warnings, because the payment has already
been taken by that point. Read GET /v1/products/{id}/custom-fields or the order
response's custom_fields to discover which fields a merchant has defined.
Shipping calculation details from /v1/shipping/calculate for audit trail
Show child attributes
gift_card_redemption
object | null
Optional gift card to redeem towards this order
Show child attributes
promotion_usages
object[] | null
Promotion usages applied to this order (tracked when payment_status is paid)
Show child attributes
campaign_ids
string<uuid>[] | null
Campaigns to apply to this order, by id. The discount each one grants is computed
server-side against the campaign's own rules and its remaining budget, so a
campaign that has spent its budget adds nothing. Once the order is paid, what
each campaign granted is drawn from its budget.
Example:
["3f1c8a4e-9d2b-4c17-8f5a-2b6d1e7c9a04"]
apply_store_credit
boolean
Apply the customer's redeemable store credit to this order. When
true (and the order has a customer_id), store credit is spent
against the order total, capped at the total. The amount actually
applied is returned as store_credit_applied. Requires a customer.
Example:
true
store_credit_amount
number<float>
Optional cap on how much store credit to apply. When omitted (and
apply_store_credit is true) up to the full order total is applied.
The applied amount never exceeds the available balance or the total.
Example:
25
order_number
string
Your own order reference. When omitted, Galactic Core generates one. Use this to keep order numbers aligned with a system you already run.
Example:
"ORD-10432"
currency
string
ISO 4217 currency code the order is priced in. When omitted, the store's default storefront currency is used. Set it when you present prices in a currency the shopper selected, so the order is recorded in the same currency it was paid in.
Example:
"USD"
reservation_ids
string[]
Stock reservation ids returned by POST /v1/checkout/reserve. Supplying them commits the stock already held for this shopper instead of decrementing it again, which is what keeps a high-demand drop from overselling between reservation and payment. On a pending order the ids are kept with the order: they are committed when the order is paid and released when it is cancelled or its payment fails. Only holds on the order's own items are committed. At most 100 ids.
Example:
["8f2c1a9b-4d7e-4f10-9a3b-2c5e7f1d0a44"]
shipping_latitude
number<float>
Delivery latitude, used to resolve the delivery zone or distance tier that prices shipping. Send it with shipping_longitude when the shopper's coordinates are known; the server re-derives the shipping cost from them rather than trusting a client total.
Example:
40.7128
shipping_longitude
number<float>
Delivery longitude. See shipping_latitude.
Example:
-74.006
shippo_rate_id
string
The id of a carrier option from the store's connected carrier account. Equivalent to shipping_rate_id with shipping_rate_source: shippo. The option is fetched again and checked before it is charged, so a modified, stale or foreign option is rejected.
Example:
"rate_8f2c1a9b4d7e4f109a3b2c5e7f1d0a44"
shipping_rate_id
string
The id of the carrier option the shopper chose, as returned in rates[] by POST /v1/shipping/calculate. Send with shipping_rate_source.
Example:
"rate_8f2c1a9b4d7e4f109a3b2c5e7f1d0a44"
shipping_rate_source
enum<string>
Where the chosen option came from — its source in rates[]: the store's carrier account (shippo, or the neutral spelling carrier) or its custom shipping extension (custom).
Available options:
shippo,
carrier,
custom
Example:
"shippo"
shipping_parcel
object
The parcel the option was quoted for. Required with shipping_rate_source: custom, because the extension is asked for its options again to check the one chosen.
Show child attributes
fulfillment_method
enum<string>
How the shopper receives the order: delivered to shipping_address (delivery, the default when something ships), collected at one of the store's locations (pickup), or none when nothing ships. The server derives the method from the items. When every item is a download, a code, an event ticket or a service, the order is stored as none whatever was sent; when any item ships, none is refused with 400 fulfillment_method_invalid.
Available options:
delivery,
pickup,
none
Example:
"delivery"
pickup_location_id
string<uuid>
The location to collect from, on a pickup order — a location id from pickup_locations (GET /v1/shipping/zones) or from a pickup option's location (POST /v1/shipping/calculate). When omitted on a pickup order, the store's primary pickup location is used.
Example:
"3d5c7a10-8b2e-4f61-9c4d-1a2b3c4d5e6f"
shipping_option_id
string
The id of the option the shopper chose from options[] in POST /v1/shipping/calculate — place for standard delivery, opt:<id> for a named delivery option such as Express, or pickup:<location id> on a pickup order. shipping_amount must equal that option's fee for this order.
Maximum string length: 60
Example:
"opt:9a1f3c2e-5b7d-4e8a-a2c4-6d8e0f1a3b5c"
shipping_address_from
object
The ship-from address the option was quoted with, when one was sent to POST /v1/shipping/calculate as address_from.
attribution
object | null
Where this order came from, recorded for the merchant's analytics. Accepts the fields below; the same fields are also read from the top level of the request body if you already send them there. Promotions that actually applied are recorded from the server-validated result, so promotion_ids never inflates what a shopper received.
Show child attributes
gclid
string | null
Google ad click id, when the shopper arrived from a Google ad. On a paid order this lets the merchant's Google advertising get credit for the sale, and is kept on the order so the merchant's own reports can attribute revenue and profit to the ad that earned it rather than relying on the ad platform's account. Forward the true captured value; omit if not present.
Example:
"Cj0KCQiA...gclid"
fbclid
string | null
Meta (Facebook & Instagram) ad click id, when the shopper arrived from a Meta ad. On a paid order this lets the merchant's Meta advertising get credit for the sale. The conversion is sent server-side (Conversions API) and de-duplicated against the storefront's Meta Pixel by the order id, so it counts even when the browser blocks the Pixel. It is kept on the order so the merchant's own reports can attribute revenue and profit to the ad that earned it. Forward the true captured value; omit if not present.
Example:
"IwAR1abc...fbclid"
ad_consent
object | null
Advertising privacy-consent state captured at checkout, used to decide whether a conversion may be reported to an ad platform for this shopper's region (required for EEA shoppers; UK/Swiss records are not dropped for a missing signal). Always forward the true captured values — never guess.
Show child attributes
subscribe_save
object
Subscribes the shopper to the lines of this order that a Subscribe & Save offer covers.
The order is priced and charged as a normal order with the offer's first-order discount.
The subscription starts when the order is paid, never before, and its later deliveries
are created as separate orders on the interval the shopper chose.
A subscription belongs to a signed-in shopper: send the shopper's customer_id. An
order without one is refused with 409 account_required.
The offer decides which lines are subscribed; an offer that is not live, or that
covers none of the order's lines, is refused with 400 subscribe_save_not_applicable.
Use POST /v1/subscribe-save/quote to show the shopper the price before ordering.
discount_amount is checked against the discount the offer grants, together with any
promotions the offer allows to stack. It may be lower, never higher
(400 discount_invalid).
When the offer includes free shipping, shipping_amount is 0.
To save the shopper's card for the later deliveries, request it when the payment is
started (save_payment_method on POST /v1/payments/initialize).
Show child attributes
Response
The Idempotency-Key has already been used for this store, so the order it created is
returned instead of a new one being made. The body is the order resource, exactly as
GET /v1/orders/{id} would return it — note this differs from the 201 envelope, which
nests the order under an order property.
Retrying a create with the same key is always safe: concurrent retries resolve to the
same order, and only the first request receives 201.
id
string<uuid>
order_number
string
Example:
"ORD-2026-001234"
customer_id
string<uuid>
customer_email
string<email>
customer_phone
string
customer_name
string
order_status
enum<string>
Available options:
pending,
confirmed,
processing,
shipped,
delivered,
cancelled
Example:
"pending"
payment_status
enum<string>
Available options:
pending,
paid,
failed,
refunded
Example:
"pending"
payment_method
string
Method used for payment: a built-in method (card, stripe, paypal, paystack, mpesa, mpesa_c2b, cash, bank_transfer, free) or the identifier of one of the store's own payment providers.
Example:
"stripe"
payment_reference
string
subtotal
number<float>
Example:
1999.98
tax_amount
number<float>
Example:
159.99
tax_breakdown
object[] | null
Per-jurisdiction tax detail when tax was calculated automatically for the shipping destination (one entry per taxing jurisdiction). Null when a flat store rate was used.
Show child attributes
tax_source
enum<string> | null
How the tax figure was produced — automatic (jurisdiction-accurate calculation for the destination), fallback (automatic calculation was unavailable, so the store's configured rate was used), or manual (the store's configured rate).
Available options:
automatic,
fallback,
manual,
null
Example:
"automatic"
shipping_amount
number<float>
Example:
15
discount_amount
number<float>
Example:
0
total_amount
number<float>
Example:
2174.97
billing_address
object
Show child attributes
shipping_address
object | null
Where the order goes. null on an order with fulfillment_methodnone, where nothing is shipped.
Show child attributes
fulfillment_method
enum<string>
Whether the order is delivered to the shopper, collected at one of the store's locations, or has nothing to ship (none: downloads, codes, event tickets and services only).
Available options:
delivery,
pickup,
none
Example:
"delivery"
order_type
enum<string>
b2b for a wholesale order placed by a buyer account, retail for every other order. The order.created, order.paid, order.fulfilled, order.cancelled, order.updated and order.refunded events carry the same field.
Available options:
retail,
b2b
Example:
"retail"
pickup_location_id
string<uuid> | null
The location the shopper collects from, on a pickup order. Null on a delivery order.
Example:
null
fulfillment_location_id
string<uuid> | null
The store location the order is fulfilled from: the pickup location on a pickup order, or the location deliveries leave from when the store delivers from its nearest location. Null when the store does not route orders between locations.
Example:
"7b2e9c41-0d3f-4a58-b6e1-2f4a6c8e0b13"
shipping_option_id
string | null
The shipping option the order was placed with, as returned by POST /v1/shipping/calculate (place, opt:<id> or pickup:<location id>). Null when none was named.
Example:
"place"
items
object[]
Show child attributes
status_notes
object[]
Customer-visible updates the merchant added as the order moved — the work between payment and
dispatch (preparation, checks, packing) that a shopper otherwise hears nothing about. Oldest
first, so it reads as a timeline. Internal notes are never included.
Show child attributes
custom_fields
object[]
The merchant's own fields on this order, with their values — a buyer's purchase-order number, a
cost centre, whatever the merchant defined. Only fields the merchant published appear here; one
holding an internal note or a cost stays in the admin. Empty when the merchant has defined none.
The merchant controls the names and how many exist, so render the array rather than reading fixed
keys: field_label is the heading to show, and field_type gives the shape of value.
Show child attributes
notes
string
tracking_number
string
estimated_delivery
string<date-time>
shipped_at
string<date-time>
delivered_at
string<date-time>
created_at
string<date-time>
updated_at
string<date-time>
environment
enum<string>
Whether this order was created in the live or test environment. Sandbox orders are isolated from production data.
Available options:
production,
sandbox
Example:
"production"
shipping_metadata
object | null
How the shipping charge was arrived at. shipping_source and shipping_rule are recorded by the server when the order is created; the other fields are the details the storefront sent with the order.
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Galactic Core API Documentation","colors":{"primary":"#3b82f6","light":"#60a5fa","dark":"#3b82f6"},"logo":{"light":"https://mintcdn.com/tybritelabs/9cNSmgnBxs-QU_UC/branding/gc-long-blue.png?fit=max\u0026auto=format\u0026n=9cNSmgnBxs-QU_UC\u0026q=85\u0026s=88d64ea989973d874ed73437459487f7","dark":"https://mintcdn.com/tybritelabs/9cNSmgnBxs-QU_UC/branding/gc-long-white.png?fit=max\u0026auto=format\u0026n=9cNSmgnBxs-QU_UC\u0026q=85\u0026s=051cafe35073e2d41a7bfb963b3ad22b"},"favicon":"https://mintcdn.com/tybritelabs/9cNSmgnBxs-QU_UC/favicon.svg?fit=max\u0026auto=format\u0026n=9cNSmgnBxs-QU_UC\u0026q=85\u0026s=83f32264cd55e429e1a14f9d0ee78689","navbar":{"links":[{"href":"https://gc.tybritelabs.com/dashboard","label":"Dashboard"}],"primary":{"type":"button","label":"Get Started","href":"/quickstart"}},"footer":{"socials":{"github":"https://github.com/tybrite","twitter":"https://twitter.com/tybrite","linkedin":"https://linkedin.com/company/tybrite"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://gc.tybritelabs.com/dashboard"},{"anchor":"GitHub","icon":"github","href":"https://github.com/tybrite"},{"anchor":"Support","icon":"envelope","href":"mailto:support@tybrite.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tybritelabs","hasAudioNarration":false,"actualSubdomain":"tybritelabs","customDomains":["docs.tybritelabs.com"],"gitSource":{"type":"github","owner":"tybrite","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6b062237df4589996178296d","clientVersion":"0.0.4352","searchFilterCounts":[{"language":"default","tag":"Galactic Core","count":350},{"language":"default","tag":"API Reference","count":294},{"language":"default","tag":"TLDP","count":51},{"language":"default","tag":"Getting Started","count":50},{"language":"default","tag":"TypeScript SDK","count":47},{"language":"default","tag":"Agent","count":43},{"language":"default","tag":"Customers","count":25},{"language":"default","tag":"Returns","count":15},{"language":"default","tag":"Marketplace","count":14},{"language":"default","tag":"B2B","count":14}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/orders/create-order","slug":"/api-reference/orders/create-order","pageMetadata":{"title":"Create order","description":"Create a new order with HMAC signature verification and idempotency protection.\n\n**🔐 HMAC Signing (REQUIRED)**\n \nAll order creation requests MUST include HMAC-SHA256 signature for security:\n \n1. **Generate Timestamp**: Get current Unix timestamp in seconds\n2. **Create Payload**: Concatenate `timestamp + \".\" + JSON_body`\n3. **Sign Payload**: `HMAC-SHA256(hmac_secret, payload)` → base64 encode\n4. **Include Headers**:\n - `X-Timestamp`: Unix time in seconds or milliseconds (within 5 minutes of server time)\n - `X-Signature`: Base64-encoded HMAC signature\n \n**Example (Node.js):**\n \n**🔄 Idempotency Protection**\n \nInclude `Idempotency-Key` header to prevent duplicate orders on retry. \nA replay with the same key and body returns the original order (200) and creates no second order.\n \n**⚠️ Security Notes:**\n- HMAC secret is displayed in the Integrations page (Developer section)\n- Never expose HMAC secret in client-side code\n- Regenerate secret immediately if compromised\n- Requests with invalid/missing signatures return 401 Unauthorized\n- Timestamps older than 5 minutes are rejected to prevent replay attacks\n\n**Orders with nothing to ship**\n\nAn order whose items are all downloads, codes, event tickets or services needs no delivery address\nand is quoted no delivery charge. The method is derived from the items (`fulfillment_method` `none`),\nso `shipping_address` can be left out and `shipping_amount` is 0. A mixed basket is quoted for its\nshipped items only. Each item's kind is stored on the line as `fulfilment_kind`, and the delivery of\neach purchased unit is tracked after payment.\n\n- **Billing location.** Because nothing ships, `billing_address.country_code` and\n `billing_address.postal_code` decide the tax; without them the order is refused with\n `400 billing_location_required`.\n- **Event tickets.** Checkout refuses a ticket whose sale has not opened or has closed\n (`409 ticket_sale_closed`), an event that has ended (`409 ticket_event_ended`), more units than\n `max_per_order` (`400 ticket_limit_exceeded`) and a sold-out ticket type or full venue\n (`409 insufficient_stock`). `409 not_available` marks an item that can no longer be sold by the\n store. `items[].attendee_names` names the people on group tickets.\n- **Line fields.** `items[].custom_fields` answers the merchant's fields for the line. A required\n field that is empty on an event ticket or a code is refused with `400 line_field_required`, with\n `details.item_index` and `details.field_name`.\n- **Free orders.** A zero-total order of downloads and event tickets is created paid with\n `payment_method` `free`, for a signed-in shopper identified by `x-auth-token`,\n `x-external-auth` or a `customer_id` linked to a shopper account. Otherwise it is refused with\n `409 account_required`.\n\n**🛡️ Server-side price validation (anti-tampering)**\n\nHMAC proves the body wasn't altered in transit; it does **not** prove the amounts are honest.\nSo the server independently recomputes the order from authoritative data and rejects any\nmismatch — you cannot set your own prices or discounts:\n\n- **Item prices** are recomputed from the live catalog. The catalog price of a line is the\n variant's online sale price when one applies, otherwise its online price (its in-store price\n when no online price is set). `unit_price` / `total_price` that don't\n match the catalog price → **`400 price_mismatch`**. (The stored order always uses the catalog\n price, never the value you send.)\n- **`subtotal`, `tax_amount`, `total_amount`** must reconcile to `subtotal + tax + shipping −\n discount` over those catalog prices → otherwise **`400 price_mismatch`**.\n- **`tax_amount`** is calculated by the server when you omit it: for the `shipping_address` when\n the store has automatic tax (the shipping charge is rated as its own line), otherwise at the\n store's own rate — on the line totals, plus the shipping charge when the store charges tax on\n shipping. At the store's own rate a `tax_amount` you send must match that figure to the cent →\n otherwise **`400 price_mismatch`**. When the store's prices include tax, the tax is taken from\n what the shopper pays (line totals − discount, plus shipping when taxed) and `subtotal` is the\n line totals minus that tax. `POST /v1/tax/preview` returns the same figure before checkout.\n- **`discount_amount`** is validated against the discount the promotions / gift card you claim\n actually grant (computed server-side from `promotion_usages` + `gift_card_redemption`). A\n `discount_amount` greater than that legitimate maximum → **`400 discount_invalid`**. A discount\n with no real promotion/gift card behind it → max is `0`. (You may apply *less* than the maximum.)\n- **`shipping_amount`** is checked on every order, $0 included, and may not be negative:\n - With a carrier option (`shipping_rate_id` + `shipping_rate_source`, or `shippo_rate_id`),\n the option is fetched again from its source — the store's carrier account, or its custom\n shipping extension re-quoted for `shipping_address` and `shipping_parcel`. An unknown,\n expired or foreign option, one in another currency, or a test-mode option on a live order →\n **`400 shipping_rate_invalid`**; an amount that differs from the option →\n **`400 price_mismatch`**.\n - Otherwise, when the store has delivery rates and the destination is known\n (`shipping_latitude`/`shipping_longitude`, or a `shipping_address` that can be located), the\n amount must equal the store's charge for that address, free-delivery thresholds measured\n against the line totals after `discount_amount` → otherwise **`400 price_mismatch`**. A\n destination the store does not deliver to → **`400 shipping_not_deliverable`**.\n - With a named delivery option (`shipping_option_id` of the form `opt:\u003cid>`), the amount must\n equal that option's fee for the address and basket → otherwise **`400 price_mismatch`**. An\n option the order does not qualify for → **`400 shipping_option_unavailable`**.\n - On a pickup order (`fulfillment_method: pickup`), the amount must equal the location's pickup\n fee → otherwise **`400 price_mismatch`**. A location that is not one of the store's pickup\n locations, or an order below its minimum → **`400 pickup_unavailable`**. Tax is calculated\n at the pickup location.\n - A store with no delivery rates (it ships through its own arrangements) accepts the amount\n sent; so does an order whose destination cannot be located. Such an order is recorded as\n not checked.\n - When shipping cannot be checked because the service is unreachable →\n **`502 shipping_unavailable`**; the order is not created.\n\nIn short: send the **real catalog prices** and the **actual promotions/gift card** the shopper is\nentitled to. Don't compute or invent prices/discounts client-side — the server is the authority.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/orders","href":"/api-reference/orders/create-order","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n em: \"em\",\n li: \"li\",\n ol: \"ol\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Create a new order with HMAC signature verification and idempotency protection.\"\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"🔐 HMAC Signing (REQUIRED)\"\n })\n }), \"\\n\", _jsx(_components.p, {\n children: \"All order creation requests MUST include HMAC-SHA256 signature for security:\"\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Generate Timestamp\"\n }), \": Get current Unix timestamp in seconds\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Create Payload\"\n }), \": Concatenate \", _jsx(_components.code, {\n children: \"timestamp + \\\".\\\" + JSON_body\"\n })]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Sign Payload\"\n }), \": \", _jsx(_components.code, {\n children: \"HMAC-SHA256(hmac_secret, payload)\"\n }), \" → base64 encode\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Include Headers\"\n }), \":\", \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"X-Timestamp\"\n }), \": Unix time in seconds or milliseconds (within 5 minutes of server time)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"X-Signature\"\n }), \": Base64-encoded HMAC signature\"]\n }), \"\\n\"]\n }), \"\\n\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Example (Node.js):\"\n })\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"🔄 Idempotency Protection\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Include \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" header to prevent duplicate orders on retry.\\nA replay with the same key and body returns the original order (200) and creates no second order.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"⚠️ Security Notes:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"HMAC secret is displayed in the Integrations page (Developer section)\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Never expose HMAC secret in client-side code\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Regenerate secret immediately if compromised\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Requests with invalid/missing signatures return 401 Unauthorized\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Timestamps older than 5 minutes are rejected to prevent replay attacks\"\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Orders with nothing to ship\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"An order whose items are all downloads, codes, event tickets or services needs no delivery address\\nand is quoted no delivery charge. The method is derived from the items (\", _jsx(_components.code, {\n children: \"fulfillment_method\"\n }), \" \", _jsx(_components.code, {\n children: \"none\"\n }), \"),\\nso \", _jsx(_components.code, {\n children: \"shipping_address\"\n }), \" can be left out and \", _jsx(_components.code, {\n children: \"shipping_amount\"\n }), \" is 0. A mixed basket is quoted for its\\nshipped items only. Each item’s kind is stored on the line as \", _jsx(_components.code, {\n children: \"fulfilment_kind\"\n }), \", and the delivery of\\neach purchased unit is tracked after payment.\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Billing location.\"\n }), \" Because nothing ships, \", _jsx(_components.code, {\n children: \"billing_address.country_code\"\n }), \" and\\n\", _jsx(_components.code, {\n children: \"billing_address.postal_code\"\n }), \" decide the tax; without them the order is refused with\\n\", _jsx(_components.code, {\n children: \"400 billing_location_required\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Event tickets.\"\n }), \" Checkout refuses a ticket whose sale has not opened or has closed\\n(\", _jsx(_components.code, {\n children: \"409 ticket_sale_closed\"\n }), \"), an event that has ended (\", _jsx(_components.code, {\n children: \"409 ticket_event_ended\"\n }), \"), more units than\\n\", _jsx(_components.code, {\n children: \"max_per_order\"\n }), \" (\", _jsx(_components.code, {\n children: \"400 ticket_limit_exceeded\"\n }), \") and a sold-out ticket type or full venue\\n(\", _jsx(_components.code, {\n children: \"409 insufficient_stock\"\n }), \"). \", _jsx(_components.code, {\n children: \"409 not_available\"\n }), \" marks an item that can no longer be sold by the\\nstore. \", _jsx(_components.code, {\n children: \"items[].attendee_names\"\n }), \" names the people on group tickets.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Line fields.\"\n }), \" \", _jsx(_components.code, {\n children: \"items[].custom_fields\"\n }), \" answers the merchant’s fields for the line. A required\\nfield that is empty on an event ticket or a code is refused with \", _jsx(_components.code, {\n children: \"400 line_field_required\"\n }), \", with\\n\", _jsx(_components.code, {\n children: \"details.item_index\"\n }), \" and \", _jsx(_components.code, {\n children: \"details.field_name\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Free orders.\"\n }), \" A zero-total order of downloads and event tickets is created paid with\\n\", _jsx(_components.code, {\n children: \"payment_method\"\n }), \" \", _jsx(_components.code, {\n children: \"free\"\n }), \", for a signed-in shopper identified by \", _jsx(_components.code, {\n children: \"x-auth-token\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"x-external-auth\"\n }), \" or a \", _jsx(_components.code, {\n children: \"customer_id\"\n }), \" linked to a shopper account. Otherwise it is refused with\\n\", _jsx(_components.code, {\n children: \"409 account_required\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"🛡️ Server-side price validation (anti-tampering)\"\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"HMAC proves the body wasn’t altered in transit; it does \", _jsx(_components.strong, {\n children: \"not\"\n }), \" prove the amounts are honest.\\nSo the server independently recomputes the order from authoritative data and rejects any\\nmismatch — you cannot set your own prices or discounts:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Item prices\"\n }), \" are recomputed from the live catalog. The catalog price of a line is the\\nvariant’s online sale price when one applies, otherwise its online price (its in-store price\\nwhen no online price is set). \", _jsx(_components.code, {\n children: \"unit_price\"\n }), \" / \", _jsx(_components.code, {\n children: \"total_price\"\n }), \" that don’t\\nmatch the catalog price → \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 price_mismatch\"\n })\n }), \". (The stored order always uses the catalog\\nprice, never the value you send.)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsxs(_components.strong, {\n children: [_jsx(_components.code, {\n children: \"subtotal\"\n }), \", \", _jsx(_components.code, {\n children: \"tax_amount\"\n }), \", \", _jsx(_components.code, {\n children: \"total_amount\"\n })]\n }), \" must reconcile to \", _jsx(_components.code, {\n children: \"subtotal + tax + shipping − discount\"\n }), \" over those catalog prices → otherwise \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 price_mismatch\"\n })\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"tax_amount\"\n })\n }), \" is calculated by the server when you omit it: for the \", _jsx(_components.code, {\n children: \"shipping_address\"\n }), \" when\\nthe store has automatic tax (the shipping charge is rated as its own line), otherwise at the\\nstore’s own rate — on the line totals, plus the shipping charge when the store charges tax on\\nshipping. At the store’s own rate a \", _jsx(_components.code, {\n children: \"tax_amount\"\n }), \" you send must match that figure to the cent →\\notherwise \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 price_mismatch\"\n })\n }), \". When the store’s prices include tax, the tax is taken from\\nwhat the shopper pays (line totals − discount, plus shipping when taxed) and \", _jsx(_components.code, {\n children: \"subtotal\"\n }), \" is the\\nline totals minus that tax. \", _jsx(_components.code, {\n children: \"POST /v1/tax/preview\"\n }), \" returns the same figure before checkout.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"discount_amount\"\n })\n }), \" is validated against the discount the promotions / gift card you claim\\nactually grant (computed server-side from \", _jsx(_components.code, {\n children: \"promotion_usages\"\n }), \" + \", _jsx(_components.code, {\n children: \"gift_card_redemption\"\n }), \"). A\\n\", _jsx(_components.code, {\n children: \"discount_amount\"\n }), \" greater than that legitimate maximum → \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 discount_invalid\"\n })\n }), \". A discount\\nwith no real promotion/gift card behind it → max is \", _jsx(_components.code, {\n children: \"0\"\n }), \". (You may apply \", _jsx(_components.em, {\n children: \"less\"\n }), \" than the maximum.)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"shipping_amount\"\n })\n }), \" is checked on every order, $0 included, and may not be negative:\", \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"With a carrier option (\", _jsx(_components.code, {\n children: \"shipping_rate_id\"\n }), \" + \", _jsx(_components.code, {\n children: \"shipping_rate_source\"\n }), \", or \", _jsx(_components.code, {\n children: \"shippo_rate_id\"\n }), \"),\\nthe option is fetched again from its source — the store’s carrier account, or its custom\\nshipping extension re-quoted for \", _jsx(_components.code, {\n children: \"shipping_address\"\n }), \" and \", _jsx(_components.code, {\n children: \"shipping_parcel\"\n }), \". An unknown,\\nexpired or foreign option, one in another currency, or a test-mode option on a live order →\\n\", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 shipping_rate_invalid\"\n })\n }), \"; an amount that differs from the option →\\n\", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 price_mismatch\"\n })\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Otherwise, when the store has delivery rates and the destination is known\\n(\", _jsx(_components.code, {\n children: \"shipping_latitude\"\n }), \"/\", _jsx(_components.code, {\n children: \"shipping_longitude\"\n }), \", or a \", _jsx(_components.code, {\n children: \"shipping_address\"\n }), \" that can be located), the\\namount must equal the store’s charge for that address, free-delivery thresholds measured\\nagainst the line totals after \", _jsx(_components.code, {\n children: \"discount_amount\"\n }), \" → otherwise \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 price_mismatch\"\n })\n }), \". A\\ndestination the store does not deliver to → \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 shipping_not_deliverable\"\n })\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"With a named delivery option (\", _jsx(_components.code, {\n children: \"shipping_option_id\"\n }), \" of the form \", _jsx(_components.code, {\n children: \"opt:\u003cid>\"\n }), \"), the amount must\\nequal that option’s fee for the address and basket → otherwise \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 price_mismatch\"\n })\n }), \". An\\noption the order does not qualify for → \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 shipping_option_unavailable\"\n })\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"On a pickup order (\", _jsx(_components.code, {\n children: \"fulfillment_method: pickup\"\n }), \"), the amount must equal the location’s pickup\\nfee → otherwise \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 price_mismatch\"\n })\n }), \". A location that is not one of the store’s pickup\\nlocations, or an order below its minimum → \", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"400 pickup_unavailable\"\n })\n }), \". Tax is calculated\\nat the pickup location.\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"A store with no delivery rates (it ships through its own arrangements) accepts the amount\\nsent; so does an order whose destination cannot be located. Such an order is recorded as\\nnot checked.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"When shipping cannot be checked because the service is unreachable →\\n\", _jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"502 shipping_unavailable\"\n })\n }), \"; the order is not created.\"]\n }), \"\\n\"]\n }), \"\\n\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"In short: send the \", _jsx(_components.strong, {\n children: \"real catalog prices\"\n }), \" and the \", _jsx(_components.strong, {\n children: \"actual promotions/gift card\"\n }), \" the shopper is\\nentitled to. Don’t compute or invent prices/discounts client-side — the server is the authority.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create order","description":"Create a new order with HMAC signature verification and idempotency protection.\n\n**🔐 HMAC Signing (REQUIRED)**\n \nAll order creation requests MUST include HMAC-SHA256 signature for security:\n \n1. **Generate Timestamp**: Get current Unix timestamp in seconds\n2. **Create Payload**: Concatenate `timestamp + \".\" + JSON_body`\n3. **Sign Payload**: `HMAC-SHA256(hmac_secret, payload)` → base64 encode\n4. **Include Headers**:\n - `X-Timestamp`: Unix time in seconds or milliseconds (within 5 minutes of server time)\n - `X-Signature`: Base64-encoded HMAC signature\n \n**Example (Node.js):**\n \n**🔄 Idempotency Protection**\n \nInclude `Idempotency-Key` header to prevent duplicate orders on retry. \nA replay with the same key and body returns the original order (200) and creates no second order.\n \n**⚠️ Security Notes:**\n- HMAC secret is displayed in the Integrations page (Developer section)\n- Never expose HMAC secret in client-side code\n- Regenerate secret immediately if compromised\n- Requests with invalid/missing signatures return 401 Unauthorized\n- Timestamps older than 5 minutes are rejected to prevent replay attacks\n\n**Orders with nothing to ship**\n\nAn order whose items are all downloads, codes, event tickets or services needs no delivery address\nand is quoted no delivery charge. The method is derived from the items (`fulfillment_method` `none`),\nso `shipping_address` can be left out and `shipping_amount` is 0. A mixed basket is quoted for its\nshipped items only. Each item's kind is stored on the line as `fulfilment_kind`, and the delivery of\neach purchased unit is tracked after payment.\n\n- **Billing location.** Because nothing ships, `billing_address.country_code` and\n `billing_address.postal_code` decide the tax; without them the order is refused with\n `400 billing_location_required`.\n- **Event tickets.** Checkout refuses a ticket whose sale has not opened or has closed\n (`409 ticket_sale_closed`), an event that has ended (`409 ticket_event_ended`), more units than\n `max_per_order` (`400 ticket_limit_exceeded`) and a sold-out ticket type or full venue\n (`409 insufficient_stock`). `409 not_available` marks an item that can no longer be sold by the\n store. `items[].attendee_names` names the people on group tickets.\n- **Line fields.** `items[].custom_fields` answers the merchant's fields for the line. A required\n field that is empty on an event ticket or a code is refused with `400 line_field_required`, with\n `details.item_index` and `details.field_name`.\n- **Free orders.** A zero-total order of downloads and event tickets is created paid with\n `payment_method` `free`, for a signed-in shopper identified by `x-auth-token`,\n `x-external-auth` or a `customer_id` linked to a shopper account. Otherwise it is refused with\n `409 account_required`.\n\n**🛡️ Server-side price validation (anti-tampering)**\n\nHMAC proves the body wasn't altered in transit; it does **not** prove the amounts are honest.\nSo the server independently recomputes the order from authoritative data and rejects any\nmismatch — you cannot set your own prices or discounts:\n\n- **Item prices** are recomputed from the live catalog. The catalog price of a line is the\n variant's online sale price when one applies, otherwise its online price (its in-store price\n when no online price is set). `unit_price` / `total_price` that don't\n match the catalog price → **`400 price_mismatch`**. (The stored order always uses the catalog\n price, never the value you send.)\n- **`subtotal`, `tax_amount`, `total_amount`** must reconcile to `subtotal + tax + shipping −\n discount` over those catalog prices → otherwise **`400 price_mismatch`**.\n- **`tax_amount`** is calculated by the server when you omit it: for the `shipping_address` when\n the store has automatic tax (the shipping charge is rated as its own line), otherwise at the\n store's own rate — on the line totals, plus the shipping charge when the store charges tax on\n shipping. At the store's own rate a `tax_amount` you send must match that figure to the cent →\n otherwise **`400 price_mismatch`**. When the store's prices include tax, the tax is taken from\n what the shopper pays (line totals − discount, plus shipping when taxed) and `subtotal` is the\n line totals minus that tax. `POST /v1/tax/preview` returns the same figure before checkout.\n- **`discount_amount`** is validated against the discount the promotions / gift card you claim\n actually grant (computed server-side from `promotion_usages` + `gift_card_redemption`). A\n `discount_amount` greater than that legitimate maximum → **`400 discount_invalid`**. A discount\n with no real promotion/gift card behind it → max is `0`. (You may apply *less* than the maximum.)\n- **`shipping_amount`** is checked on every order, $0 included, and may not be negative:\n - With a carrier option (`shipping_rate_id` + `shipping_rate_source`, or `shippo_rate_id`),\n the option is fetched again from its source — the store's carrier account, or its custom\n shipping extension re-quoted for `shipping_address` and `shipping_parcel`. An unknown,\n expired or foreign option, one in another currency, or a test-mode option on a live order →\n **`400 shipping_rate_invalid`**; an amount that differs from the option →\n **`400 price_mismatch`**.\n - Otherwise, when the store has delivery rates and the destination is known\n (`shipping_latitude`/`shipping_longitude`, or a `shipping_address` that can be located), the\n amount must equal the store's charge for that address, free-delivery thresholds measured\n against the line totals after `discount_amount` → otherwise **`400 price_mismatch`**. A\n destination the store does not deliver to → **`400 shipping_not_deliverable`**.\n - With a named delivery option (`shipping_option_id` of the form `opt:\u003cid>`), the amount must\n equal that option's fee for the address and basket → otherwise **`400 price_mismatch`**. An\n option the order does not qualify for → **`400 shipping_option_unavailable`**.\n - On a pickup order (`fulfillment_method: pickup`), the amount must equal the location's pickup\n fee → otherwise **`400 price_mismatch`**. A location that is not one of the store's pickup\n locations, or an order below its minimum → **`400 pickup_unavailable`**. Tax is calculated\n at the pickup location.\n - A store with no delivery rates (it ships through its own arrangements) accepts the amount\n sent; so does an order whose destination cannot be located. Such an order is recorded as\n not checked.\n - When shipping cannot be checked because the service is unreachable →\n **`502 shipping_unavailable`**; the order is not created.\n\nIn short: send the **real catalog prices** and the **actual promotions/gift card** the shopper is\nentitled to. Don't compute or invent prices/discounts client-side — the server is the authority.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/orders","href":"/api-reference/orders/create-order","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/tybritelabs/af1ac4e439492905/sync.js","/_mintlify/custom/tybritelabs/cffa438ecec94ea5/scripts/check-tldp-isolation.js"],"openApiReferenceData":{"operation":{"operationId":"createOrder","tags":["Orders"],"summary":"Create order","description":"Create a new order with HMAC signature verification and idempotency protection.\n\n**🔐 HMAC Signing (REQUIRED)**\n \nAll order creation requests MUST include HMAC-SHA256 signature for security:\n \n1. **Generate Timestamp**: Get current Unix timestamp in seconds\n2. **Create Payload**: Concatenate `timestamp + \".\" + JSON_body`\n3. **Sign Payload**: `HMAC-SHA256(hmac_secret, payload)` → base64 encode\n4. **Include Headers**:\n - `X-Timestamp`: Unix time in seconds or milliseconds (within 5 minutes of server time)\n - `X-Signature`: Base64-encoded HMAC signature\n \n**Example (Node.js):**\n \n**🔄 Idempotency Protection**\n \nInclude `Idempotency-Key` header to prevent duplicate orders on retry. \nA replay with the same key and body returns the original order (200) and creates no second order.\n \n**⚠️ Security Notes:**\n- HMAC secret is displayed in the Integrations page (Developer section)\n- Never expose HMAC secret in client-side code\n- Regenerate secret immediately if compromised\n- Requests with invalid/missing signatures return 401 Unauthorized\n- Timestamps older than 5 minutes are rejected to prevent replay attacks\n\n**Orders with nothing to ship**\n\nAn order whose items are all downloads, codes, event tickets or services needs no delivery address\nand is quoted no delivery charge. The method is derived from the items (`fulfillment_method` `none`),\nso `shipping_address` can be left out and `shipping_amount` is 0. A mixed basket is quoted for its\nshipped items only. Each item's kind is stored on the line as `fulfilment_kind`, and the delivery of\neach purchased unit is tracked after payment.\n\n- **Billing location.** Because nothing ships, `billing_address.country_code` and\n `billing_address.postal_code` decide the tax; without them the order is refused with\n `400 billing_location_required`.\n- **Event tickets.** Checkout refuses a ticket whose sale has not opened or has closed\n (`409 ticket_sale_closed`), an event that has ended (`409 ticket_event_ended`), more units than\n `max_per_order` (`400 ticket_limit_exceeded`) and a sold-out ticket type or full venue\n (`409 insufficient_stock`). `409 not_available` marks an item that can no longer be sold by the\n store. `items[].attendee_names` names the people on group tickets.\n- **Line fields.** `items[].custom_fields` answers the merchant's fields for the line. A required\n field that is empty on an event ticket or a code is refused with `400 line_field_required`, with\n `details.item_index` and `details.field_name`.\n- **Free orders.** A zero-total order of downloads and event tickets is created paid with\n `payment_method` `free`, for a signed-in shopper identified by `x-auth-token`,\n `x-external-auth` or a `customer_id` linked to a shopper account. Otherwise it is refused with\n `409 account_required`.\n\n**🛡️ Server-side price validation (anti-tampering)**\n\nHMAC proves the body wasn't altered in transit; it does **not** prove the amounts are honest.\nSo the server independently recomputes the order from authoritative data and rejects any\nmismatch — you cannot set your own prices or discounts:\n\n- **Item prices** are recomputed from the live catalog. The catalog price of a line is the\n variant's online sale price when one applies, otherwise its online price (its in-store price\n when no online price is set). `unit_price` / `total_price` that don't\n match the catalog price → **`400 price_mismatch`**. (The stored order always uses the catalog\n price, never the value you send.)\n- **`subtotal`, `tax_amount`, `total_amount`** must reconcile to `subtotal + tax + shipping −\n discount` over those catalog prices → otherwise **`400 price_mismatch`**.\n- **`tax_amount`** is calculated by the server when you omit it: for the `shipping_address` when\n the store has automatic tax (the shipping charge is rated as its own line), otherwise at the\n store's own rate — on the line totals, plus the shipping charge when the store charges tax on\n shipping. At the store's own rate a `tax_amount` you send must match that figure to the cent →\n otherwise **`400 price_mismatch`**. When the store's prices include tax, the tax is taken from\n what the shopper pays (line totals − discount, plus shipping when taxed) and `subtotal` is the\n line totals minus that tax. `POST /v1/tax/preview` returns the same figure before checkout.\n- **`discount_amount`** is validated against the discount the promotions / gift card you claim\n actually grant (computed server-side from `promotion_usages` + `gift_card_redemption`). A\n `discount_amount` greater than that legitimate maximum → **`400 discount_invalid`**. A discount\n with no real promotion/gift card behind it → max is `0`. (You may apply *less* than the maximum.)\n- **`shipping_amount`** is checked on every order, $0 included, and may not be negative:\n - With a carrier option (`shipping_rate_id` + `shipping_rate_source`, or `shippo_rate_id`),\n the option is fetched again from its source — the store's carrier account, or its custom\n shipping extension re-quoted for `shipping_address` and `shipping_parcel`. An unknown,\n expired or foreign option, one in another currency, or a test-mode option on a live order →\n **`400 shipping_rate_invalid`**; an amount that differs from the option →\n **`400 price_mismatch`**.\n - Otherwise, when the store has delivery rates and the destination is known\n (`shipping_latitude`/`shipping_longitude`, or a `shipping_address` that can be located), the\n amount must equal the store's charge for that address, free-delivery thresholds measured\n against the line totals after `discount_amount` → otherwise **`400 price_mismatch`**. A\n destination the store does not deliver to → **`400 shipping_not_deliverable`**.\n - With a named delivery option (`shipping_option_id` of the form `opt:\u003cid>`), the amount must\n equal that option's fee for the address and basket → otherwise **`400 price_mismatch`**. An\n option the order does not qualify for → **`400 shipping_option_unavailable`**.\n - On a pickup order (`fulfillment_method: pickup`), the amount must equal the location's pickup\n fee → otherwise **`400 price_mismatch`**. A location that is not one of the store's pickup\n locations, or an order below its minimum → **`400 pickup_unavailable`**. Tax is calculated\n at the pickup location.\n - A store with no delivery rates (it ships through its own arrangements) accepts the amount\n sent; so does an order whose destination cannot be located. Such an order is recorded as\n not checked.\n - When shipping cannot be checked because the service is unreachable →\n **`502 shipping_unavailable`**; the order is not created.\n\nIn short: send the **real catalog prices** and the **actual promotions/gift card** the shopper is\nentitled to. Don't compute or invent prices/discounts client-side — the server is the authority.\n","security":["fef959fc-83ac-48b9-bdfb-6fc22d417e96"],"parameters":["b70d8212-b793-4566-af3f-e650e006caad","9b4916f7-e6f6-4d93-9a71-71bc66f708d3","37e97059-5163-48d7-bcd6-c7e6f1413902","5ee09b05-2e8e-408d-bd0e-4bd6893d79d7","d11335de-b8af-4794-bc54-04c3a0f7e8c9","3a7bc1eb-344a-48f2-a44d-432aa6d759aa"],"requestBody":"0732fd55-2bd6-4d84-b569-ef60465785ab","responses":{"200":"d522b7ae-f922-461a-a508-fc280a1d7f74","201":"f5ee71ed-201f-4e28-9741-12bc982d3b0c","202":"c21bf981-c055-4ba7-afca-aa29bd06d797","400":"4b645e06-91ce-43b3-81db-75da379b34c7","401":"95e7a664-aea0-4d30-b567-ee4a7b4e5408","402":"0c7bebb3-de02-49b2-a0b6-f674c2b87607","403":"9975255a-4de7-4a3e-b999-87fc7a6da417","404":"b4bf1a22-50f1-4e1e-a810-1e02126fb7fc","409":"c852b328-14d4-48f9-909e-7dbc27fdd423","422":"aa26e63e-0aac-401a-9d5f-f628cf531e0e","429":"acef1fd5-419f-4285-81ac-85e1a47d9e69","500":"f6389ac7-75e4-4bbd-a502-52a23fa5f1bc","502":"487929e4-a828-4f0a-87e0-8dcb5de627d3","503":"ba63dd36-2e2b-4c58-8c54-ab0431e0db5c"},"method":"post","type":"path","servers":["23497b63-1a0b-4f70-a5d0-9eec416be49d"],"path":"/v1/orders","baseUrlOptions":["https://api.tybritelabs.com"],"title":"Create order","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"b70d8212-b793-4566-af3f-e650e006caad":{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique key to prevent duplicate orders (e.g., order-{timestamp}-{random})","schema":{"type":"string","isRequired":true,"description":"Unique key to prevent duplicate orders (e.g., order-{timestamp}-{random})","uniqueKey":"","typeLabel":"string"},"example":"order-1771523993-abc123"},"9b4916f7-e6f6-4d93-9a71-71bc66f708d3":{"name":"X-Timestamp","in":"header","required":true,"description":"Unix time in seconds or milliseconds, within 5 minutes of server time.\nUsed to prevent replay attacks.\n","schema":{"type":"integer","isRequired":true,"description":"Unix time in seconds or milliseconds, within 5 minutes of server time.\nUsed to prevent replay attacks.\n","uniqueKey":"","typeLabel":"integer"},"example":1771523993},"37e97059-5163-48d7-bcd6-c7e6f1413902":{"name":"X-Signature","in":"header","required":true,"description":"HMAC-SHA256 signature of the payload (timestamp + \".\" + request_body), base64-encoded.\nSign using your HMAC secret from the Integrations page (Developer section).\n","schema":{"type":"string","isRequired":true,"description":"HMAC-SHA256 signature of the payload (timestamp + \".\" + request_body), base64-encoded.\nSign using your HMAC secret from the Integrations page (Developer section).\n","uniqueKey":"","typeLabel":"string"},"example":"IqdgKXgloLzL5akDgFEwPaK6wviozf+3U0Q2eeevl494gpFUIdwMwALs+6bRn..."},"5ee09b05-2e8e-408d-bd0e-4bd6893d79d7":{"name":"x-auth-token","in":"header","required":false,"description":"The signed-in shopper's session token. Identifies the buyer of a free order (`total_amount` 0), which is created for a signed-in shopper only. The shopper must be the order's `customer_id` when one is sent. Send at most one shopper credential.","schema":{"type":"string","isRequired":false,"description":"The signed-in shopper's session token. Identifies the buyer of a free order (`total_amount` 0), which is created for a signed-in shopper only. The shopper must be the order's `customer_id` when one is sent. Send at most one shopper credential.","uniqueKey":"","typeLabel":"string"}},"d11335de-b8af-4794-bc54-04c3a0f7e8c9":{"name":"x-external-auth","in":"header","required":false,"description":"A shopper assertion signed with the store's signing secret, for stores that run their own sign-in: `external_id`, `iat` and `exp` (at most 300 seconds apart). Identifies the buyer of a free order like `x-auth-token`. Send at most one shopper credential; sending more than one returns `400`.","schema":{"type":"string","isRequired":false,"description":"A shopper assertion signed with the store's signing secret, for stores that run their own sign-in: `external_id`, `iat` and `exp` (at most 300 seconds apart). Identifies the buyer of a free order like `x-auth-token`. Send at most one shopper credential; sending more than one returns `400`.","uniqueKey":"","typeLabel":"string"}},"3a7bc1eb-344a-48f2-a44d-432aa6d759aa":{"name":"x-idp-token","in":"header","required":false,"description":"A raw token from the store's own identity provider, verified through the store's Auth verifier (fail-closed: a rejected or unreachable verifier is `401`). Identifies the buyer of a free order like `x-auth-token`. Send at most one shopper credential.","schema":{"type":"string","isRequired":false,"description":"A raw token from the store's own identity provider, verified through the store's Auth verifier (fail-closed: a rejected or unreachable verifier is `401`). Identifies the buyer of a free order like `x-auth-token`. Send at most one shopper credential.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customer_email","customer_name","billing_address","subtotal","total_amount","payment_method","items"],"properties":{"customer_email":{"type":"string","format":"email","description":"Customer email address. Required.","example":"john.doe@example.com","isRequired":true,"uniqueKey":"customer_email","typeLabel":"string\u003cemail>"},"customer_name":{"type":"string","description":"Customer full name. Required.","example":"John Doe","isRequired":true,"uniqueKey":"customer_name","typeLabel":"string"},"billing_address":{"type":"object","description":"Billing address. Required. On an order with nothing to ship (`fulfillment_method` `none`) it is the tax destination, so `country_code` (two letters) and `postal_code` are required, and the store may also ask for `street` and `city`; a request without them is refused with `400 billing_location_required`.","properties":{"country_code":{"type":"string","minLength":2,"maxLength":2,"description":"Two-letter country code. Also read from `country` when that is two letters.","example":"US","uniqueKey":"billing_address.country_code","typeLabel":"string"},"postal_code":{"type":"string","maxLength":20,"description":"Postal code. Also read from `zip`.","example":"10001","uniqueKey":"billing_address.postal_code","typeLabel":"string"},"street":{"type":"string","example":"123 Main Street","uniqueKey":"billing_address.street","typeLabel":"string"},"city":{"type":"string","example":"New York","uniqueKey":"billing_address.city","typeLabel":"string"},"state":{"type":"string","example":"NY","uniqueKey":"billing_address.state","typeLabel":"string"},"zip":{"type":"string","example":"10001","uniqueKey":"billing_address.zip","typeLabel":"string"},"country":{"type":"string","example":"US","uniqueKey":"billing_address.country","typeLabel":"string"}},"isRequired":true,"uniqueKey":"billing_address","typeLabel":"object"},"items":{"type":"array","description":"Order line items (at least one, at most 100)","minItems":1,"maxItems":100,"items":{"oneOf":[{"type":"object","description":"Provide **`variant_id` OR `product_id`** (at least one). Prefer `variant_id` — it is the exact variant (SKU) the shopper chose, so pass the same `variant_id` you put in the cart straight through to the order. If you send only `product_id`, the order is placed against the product's **default** variant — convenient for single-variant products, but for a product with multiple variants it may not be the one the shopper selected. When both are sent, `variant_id` wins (and `product_id` is resolved from it).","required":["variant_id"],"properties":{"variant_id":{"type":"string","format":"uuid","description":"Variant (SKU) UUID. Preferred. Identifies the exact variant to order. If omitted, the product's default variant is used.","example":"7a1aa0b4-555c-3618-a48c-1415db27bcc8","isRequired":true,"uniqueKey":"\\items.items.[INDEX].oneOf.0.variant_id","typeLabel":"string\u003cuuid>"},"product_id":{"type":"string","format":"uuid","description":"Product UUID. Optional when `variant_id` is given (it is resolved from the variant); when sent alone, the product's default variant is ordered.","example":"715b8c10-eb11-4289-8c0e-2966e78cf9a5","uniqueKey":"\\items.items.[INDEX].oneOf.0.product_id","typeLabel":"string\u003cuuid>"},"product_name":{"type":"string","description":"Product name captured on the line item. Optional — if omitted, it is resolved from the product automatically.","example":"Apple MacBook Pro","uniqueKey":"\\items.items.[INDEX].oneOf.0.product_name","typeLabel":"string"},"product_sku":{"type":"string","deprecated":true,"description":"Ignored. The line's SKU is read from the variant.","example":"SKU-001","uniqueKey":"\\items.items.[INDEX].oneOf.0.product_sku","typeLabel":"string"},"quantity":{"type":"integer","minimum":1,"description":"Quantity to order","example":2,"uniqueKey":"\\items.items.[INDEX].oneOf.0.quantity","typeLabel":"integer"},"unit_price":{"type":"number","format":"float","description":"Price per unit at time of order","example":1000,"uniqueKey":"\\items.items.[INDEX].oneOf.0.unit_price","typeLabel":"number\u003cfloat>"},"total_price":{"type":"number","format":"float","description":"Total price for this line item (quantity × unit_price)","example":2000,"uniqueKey":"\\items.items.[INDEX].oneOf.0.total_price","typeLabel":"number\u003cfloat>"},"product_options":{"oneOf":[{"type":"object","deprecated":true,"description":"Ignored. The line's options are read from the variant.","example":{"color":"Space Black","storage":"256GB"},"uniqueKey":"\\items.items.[INDEX].oneOf.0.product_options.oneOf.0","typeLabel":"object"},{"type":"null","deprecated":true,"description":"Ignored. The line's options are read from the variant.","example":{"color":"Space Black","storage":"256GB"},"uniqueKey":"\\items.items.[INDEX].oneOf.0.product_options.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].oneOf.0.product_options","typeLabel":"object | null"},"custom_fields":{"oneOf":[{"type":"object","description":"Values for the merchant's fields on this line, as `{ field_name: value }`: an attendee's details on an event ticket, the holder of a licence. At most 50 fields. A required field the line leaves empty on an event ticket or a code is refused with `400 line_field_required`.","additionalProperties":true,"example":{"dietary_requirements":"Vegetarian"},"uniqueKey":"\\items.items.[INDEX].oneOf.0.custom_fields.oneOf.0","typeLabel":"object"},{"type":"null","description":"Values for the merchant's fields on this line, as `{ field_name: value }`: an attendee's details on an event ticket, the holder of a licence. At most 50 fields. A required field the line leaves empty on an event ticket or a code is refused with `400 line_field_required`.","additionalProperties":true,"example":{"dietary_requirements":"Vegetarian"},"uniqueKey":"\\items.items.[INDEX].oneOf.0.custom_fields.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].oneOf.0.custom_fields","typeLabel":"object | null"},"attendee_names":{"oneOf":[{"type":"array","description":"Event tickets only. The name printed on each ticket. A `per_person` group ticket needs one name for every person admitted (`quantity` times `admits_per_unit`); a `one_code` ticket needs one holder name per unit. When omitted, the buyer's name is used. Each name is 1 to 200 characters.","items":{"type":"string","maxLength":200,"uniqueKey":"\\items.items.[INDEX].oneOf.0.attendee_names.oneOf.0.items.[INDEX]","typeLabel":"string"},"example":["Ada Lovelace","Alan Turing"],"uniqueKey":"\\items.items.[INDEX].oneOf.0.attendee_names.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Event tickets only. The name printed on each ticket. A `per_person` group ticket needs one name for every person admitted (`quantity` times `admits_per_unit`); a `one_code` ticket needs one holder name per unit. When omitted, the buyer's name is used. Each name is 1 to 200 characters.","items":{"type":"string","maxLength":200},"example":["Ada Lovelace","Alan Turing"],"uniqueKey":"\\items.items.[INDEX].oneOf.0.attendee_names.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].oneOf.0.attendee_names","typeLabel":"string[] | null"}},"uniqueKey":"\\items.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Provide **`variant_id` OR `product_id`** (at least one). Prefer `variant_id` — it is the exact variant (SKU) the shopper chose, so pass the same `variant_id` you put in the cart straight through to the order. If you send only `product_id`, the order is placed against the product's **default** variant — convenient for single-variant products, but for a product with multiple variants it may not be the one the shopper selected. When both are sent, `variant_id` wins (and `product_id` is resolved from it).","required":["product_id"],"properties":{"product_id":{"type":"string","format":"uuid","description":"Product UUID. Optional when `variant_id` is given (it is resolved from the variant); when sent alone, the product's default variant is ordered.","example":"715b8c10-eb11-4289-8c0e-2966e78cf9a5","isRequired":true,"uniqueKey":"\\items.items.[INDEX].oneOf.1.product_id","typeLabel":"string\u003cuuid>"},"variant_id":{"type":"string","format":"uuid","description":"Variant (SKU) UUID. Preferred. Identifies the exact variant to order. If omitted, the product's default variant is used.","example":"7a1aa0b4-555c-3618-a48c-1415db27bcc8","uniqueKey":"\\items.items.[INDEX].oneOf.1.variant_id","typeLabel":"string\u003cuuid>"},"product_name":{"type":"string","description":"Product name captured on the line item. Optional — if omitted, it is resolved from the product automatically.","example":"Apple MacBook Pro","uniqueKey":"\\items.items.[INDEX].oneOf.1.product_name","typeLabel":"string"},"product_sku":{"type":"string","deprecated":true,"description":"Ignored. The line's SKU is read from the variant.","example":"SKU-001","uniqueKey":"\\items.items.[INDEX].oneOf.1.product_sku","typeLabel":"string"},"quantity":{"type":"integer","minimum":1,"description":"Quantity to order","example":2,"uniqueKey":"\\items.items.[INDEX].oneOf.1.quantity","typeLabel":"integer"},"unit_price":{"type":"number","format":"float","description":"Price per unit at time of order","example":1000,"uniqueKey":"\\items.items.[INDEX].oneOf.1.unit_price","typeLabel":"number\u003cfloat>"},"total_price":{"type":"number","format":"float","description":"Total price for this line item (quantity × unit_price)","example":2000,"uniqueKey":"\\items.items.[INDEX].oneOf.1.total_price","typeLabel":"number\u003cfloat>"},"product_options":{"oneOf":[{"type":"object","deprecated":true,"description":"Ignored. The line's options are read from the variant.","example":{"color":"Space Black","storage":"256GB"},"uniqueKey":"\\items.items.[INDEX].oneOf.1.product_options.oneOf.0","typeLabel":"object"},{"type":"null","deprecated":true,"description":"Ignored. The line's options are read from the variant.","example":{"color":"Space Black","storage":"256GB"},"uniqueKey":"\\items.items.[INDEX].oneOf.1.product_options.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].oneOf.1.product_options","typeLabel":"object | null"},"custom_fields":{"oneOf":[{"type":"object","description":"Values for the merchant's fields on this line, as `{ field_name: value }`: an attendee's details on an event ticket, the holder of a licence. At most 50 fields. A required field the line leaves empty on an event ticket or a code is refused with `400 line_field_required`.","additionalProperties":true,"example":{"dietary_requirements":"Vegetarian"},"uniqueKey":"\\items.items.[INDEX].oneOf.1.custom_fields.oneOf.0","typeLabel":"object"},{"type":"null","description":"Values for the merchant's fields on this line, as `{ field_name: value }`: an attendee's details on an event ticket, the holder of a licence. At most 50 fields. A required field the line leaves empty on an event ticket or a code is refused with `400 line_field_required`.","additionalProperties":true,"example":{"dietary_requirements":"Vegetarian"},"uniqueKey":"\\items.items.[INDEX].oneOf.1.custom_fields.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].oneOf.1.custom_fields","typeLabel":"object | null"},"attendee_names":{"oneOf":[{"type":"array","description":"Event tickets only. The name printed on each ticket. A `per_person` group ticket needs one name for every person admitted (`quantity` times `admits_per_unit`); a `one_code` ticket needs one holder name per unit. When omitted, the buyer's name is used. Each name is 1 to 200 characters.","items":{"type":"string","maxLength":200,"uniqueKey":"\\items.items.[INDEX].oneOf.1.attendee_names.oneOf.0.items.[INDEX]","typeLabel":"string"},"example":["Ada Lovelace","Alan Turing"],"uniqueKey":"\\items.items.[INDEX].oneOf.1.attendee_names.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Event tickets only. The name printed on each ticket. A `per_person` group ticket needs one name for every person admitted (`quantity` times `admits_per_unit`); a `one_code` ticket needs one holder name per unit. When omitted, the buyer's name is used. Each name is 1 to 200 characters.","items":{"type":"string","maxLength":200},"example":["Ada Lovelace","Alan Turing"],"uniqueKey":"\\items.items.[INDEX].oneOf.1.attendee_names.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].oneOf.1.attendee_names","typeLabel":"string[] | null"}},"uniqueKey":"\\items.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"\\items.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"\\items","typeLabel":"object[]"},"payment_method":{"type":"string","description":"Payment method identifier (required): one of `card`, `stripe`, `paypal`, `paystack`, `mpesa`, `mpesa_c2b`, `cash`, `bank_transfer`, `free`, or the identifier of one of the store's own payment providers as listed by `GET /v1/payments/methods`. On a live key the order may name only a method the store has switched on (`card` and `free` aside); any other value answers 400 with the list the store accepts. A test key is not held to the store's switches. `free` is for an order whose `total_amount` is 0 and whose items are all downloads or event tickets; the order is created paid, for a signed-in shopper (see `x-auth-token`). It may be omitted on such an order. Any other zero-total order is refused.","example":"card","isRequired":true,"uniqueKey":"payment_method","typeLabel":"string"},"subtotal":{"type":"number","format":"float","description":"Subtotal before tax and shipping. Required.","example":2000,"isRequired":true,"uniqueKey":"subtotal","typeLabel":"number\u003cfloat>"},"total_amount":{"type":"number","format":"float","description":"Total order amount (required)","example":2520,"isRequired":true,"uniqueKey":"total_amount","typeLabel":"number\u003cfloat>"},"customer_id":{"type":"string","format":"uuid","description":"Customer UUID. Optional: an order without one is a guest checkout. Required when `subscribe_save` is sent, because a subscription belongs to a signed-in shopper.","example":"c320094c-eb65-4879-804c-83d2e1dd7f99","uniqueKey":"customer_id","typeLabel":"string\u003cuuid>"},"customer_phone":{"type":"string","description":"Customer phone number (optional)","example":"+14155550199","uniqueKey":"customer_phone","typeLabel":"string"},"shipping_address":{"type":"object","description":"Shipping address. Required for a delivery order. On a pickup order it is not needed: the collection location's address is stored as the order's shipping address, with `type: pickup`. It is not needed either when nothing in the order ships, and none is stored.","properties":{"street":{"type":"string","example":"350 Fifth Avenue","uniqueKey":"shipping_address.street","typeLabel":"string"},"city":{"type":"string","example":"New York","uniqueKey":"shipping_address.city","typeLabel":"string"},"state":{"type":"string","example":"NY","uniqueKey":"shipping_address.state","typeLabel":"string"},"zip":{"type":"string","example":"10118","uniqueKey":"shipping_address.zip","typeLabel":"string"},"country":{"type":"string","example":"US","uniqueKey":"shipping_address.country","typeLabel":"string"}},"uniqueKey":"shipping_address","typeLabel":"object"},"payment_status":{"type":"string","description":"Payment status on create (defaults to pending). Only `pending` and `paid` are accepted; later states are reached by `PATCH /v1/orders/{id}`. An order created as `paid` needs the `payment_reference` of the payment that settled it (counter-settled `cash` and `card`, and a free order, are exempt); without it the call answers 400 `payment_reference_required`.","enum":["pending","paid"],"example":"pending","uniqueKey":"payment_status","typeLabel":"enum\u003cstring>"},"order_status":{"type":"string","description":"Order status on create (defaults to pending). Only `pending`, `confirmed` and `processing` are accepted; later states are reached by `PATCH /v1/orders/{id}`.","enum":["pending","confirmed","processing"],"example":"pending","uniqueKey":"order_status","typeLabel":"enum\u003cstring>"},"tax_amount":{"type":"number","format":"float","description":"Tax amount","example":320,"uniqueKey":"tax_amount","typeLabel":"number\u003cfloat>"},"shipping_amount":{"type":"number","format":"float","description":"Shipping cost","example":200,"uniqueKey":"shipping_amount","typeLabel":"number\u003cfloat>"},"discount_amount":{"type":"number","format":"float","description":"Discount amount","example":0,"uniqueKey":"discount_amount","typeLabel":"number\u003cfloat>"},"notes":{"type":"string","description":"Additional order notes","example":"Please deliver between 9 AM - 5 PM","uniqueKey":"notes","typeLabel":"string"},"tracking_number":{"type":"string","description":"Shipping tracking number (optional, usually set on PATCH)","example":"1Z999AA10123456784","uniqueKey":"tracking_number","typeLabel":"string"},"estimated_delivery":{"type":"string","format":"date-time","description":"Estimated delivery date and time (optional)","example":"2026-02-15T14:00:00Z","uniqueKey":"estimated_delivery","typeLabel":"string\u003cdate-time>"},"payment_reference":{"type":"string","description":"External payment reference (e.g., Stripe charge ID, M-Pesa receipt)","example":"ch_1NqFvE2eZvKYlo2C8Z3y4abc","uniqueKey":"payment_reference","typeLabel":"string"},"custom_fields":{"oneOf":[{"type":"object","description":"Values for the merchant's own custom fields on this order, as\n`{ field_name: value }`. Use this to carry a reference the merchant asked for at\ncheckout — a buyer's purchase-order number, a cost centre, a delivery instruction.\n\nEach value is validated against the merchant's definition: a name that is not defined,\na value outside a `select` field's options, or a number that will not parse is\n**rejected**. A rejected field does **not** fail the order — the order is created and\nthe reason is returned in `post_processing_warnings`, because the payment has already\nbeen taken by that point. Read `GET /v1/products/{id}/custom-fields` or the order\nresponse's `custom_fields` to discover which fields a merchant has defined.\n","additionalProperties":true,"example":{"buyer_po":"PO-2026-0819","priority":"Express"},"uniqueKey":"custom_fields.oneOf.0","typeLabel":"object"},{"type":"null","description":"Values for the merchant's own custom fields on this order, as\n`{ field_name: value }`. Use this to carry a reference the merchant asked for at\ncheckout — a buyer's purchase-order number, a cost centre, a delivery instruction.\n\nEach value is validated against the merchant's definition: a name that is not defined,\na value outside a `select` field's options, or a number that will not parse is\n**rejected**. A rejected field does **not** fail the order — the order is created and\nthe reason is returned in `post_processing_warnings`, because the payment has already\nbeen taken by that point. Read `GET /v1/products/{id}/custom-fields` or the order\nresponse's `custom_fields` to discover which fields a merchant has defined.\n","additionalProperties":true,"example":{"buyer_po":"PO-2026-0819","priority":"Express"},"uniqueKey":"custom_fields.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields","typeLabel":"object | null"},"shipping_metadata":{"oneOf":[{"type":"object","description":"Shipping calculation details from /v1/shipping/calculate for audit trail","properties":{"fee":{"type":"number","example":100,"uniqueKey":"shipping_metadata.oneOf.0.fee","typeLabel":"number"},"zone_name":{"oneOf":[{"type":"string","example":null,"uniqueKey":"shipping_metadata.oneOf.0.zone_name.oneOf.0","typeLabel":"string"},{"type":"null","example":null,"uniqueKey":"shipping_metadata.oneOf.0.zone_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_metadata.oneOf.0.zone_name","typeLabel":"string | null"},"tier_name":{"oneOf":[{"type":"string","example":"Local (within 10 km)","uniqueKey":"shipping_metadata.oneOf.0.tier_name.oneOf.0","typeLabel":"string"},{"type":"null","example":"Local (within 10 km)","uniqueKey":"shipping_metadata.oneOf.0.tier_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_metadata.oneOf.0.tier_name","typeLabel":"string | null"},"distance_meters":{"oneOf":[{"type":"number","example":19.23,"uniqueKey":"shipping_metadata.oneOf.0.distance_meters.oneOf.0","typeLabel":"number"},{"type":"null","example":19.23,"uniqueKey":"shipping_metadata.oneOf.0.distance_meters.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_metadata.oneOf.0.distance_meters","typeLabel":"number | null"},"is_free":{"type":"boolean","example":false,"uniqueKey":"shipping_metadata.oneOf.0.is_free","typeLabel":"boolean"},"reason":{"type":"string","example":"19 m away","uniqueKey":"shipping_metadata.oneOf.0.reason","typeLabel":"string"},"applied_rule":{"type":"string","enum":["zone","distance","default"],"example":"distance","uniqueKey":"shipping_metadata.oneOf.0.applied_rule","typeLabel":"enum\u003cstring>"}},"uniqueKey":"shipping_metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"Shipping calculation details from /v1/shipping/calculate for audit trail","properties":{"fee":{"type":"number","example":100},"zone_name":{"oneOf":[{"type":"string","example":null},{"type":"null","example":null}]},"tier_name":{"oneOf":[{"type":"string","example":"Local (within 10 km)"},{"type":"null","example":"Local (within 10 km)"}]},"distance_meters":{"oneOf":[{"type":"number","example":19.23},{"type":"null","example":19.23}]},"is_free":{"type":"boolean","example":false},"reason":{"type":"string","example":"19 m away"},"applied_rule":{"type":"string","enum":["zone","distance","default"],"example":"distance"}},"uniqueKey":"shipping_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_metadata","typeLabel":"object | null"},"gift_card_redemption":{"oneOf":[{"type":"object","description":"Optional gift card to redeem towards this order","required":["code","amount"],"properties":{"code":{"type":"string","description":"Gift card code to redeem","example":"V5G6-4N7H-9P2R-8W1S","isRequired":true,"uniqueKey":"gift_card_redemption.oneOf.0.code","typeLabel":"string"},"amount":{"type":"number","format":"float","description":"Amount to redeem from the gift card","example":1000,"isRequired":true,"uniqueKey":"gift_card_redemption.oneOf.0.amount","typeLabel":"number\u003cfloat>"}},"uniqueKey":"gift_card_redemption.oneOf.0","typeLabel":"object"},{"type":"null","description":"Optional gift card to redeem towards this order","required":["code","amount"],"properties":{"code":{"type":"string","description":"Gift card code to redeem","example":"V5G6-4N7H-9P2R-8W1S"},"amount":{"type":"number","format":"float","description":"Amount to redeem from the gift card","example":1000}},"uniqueKey":"gift_card_redemption.oneOf.1","typeLabel":"null"}],"uniqueKey":"gift_card_redemption","typeLabel":"object | null"},"promotion_usages":{"oneOf":[{"type":"array","description":"Promotion usages applied to this order (tracked when payment_status is paid)","items":{"type":"object","required":["promotion_id","discount_amount"],"properties":{"promotion_id":{"type":"string","format":"uuid","description":"ID of the promotion that was applied","example":"7a1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e","isRequired":true,"uniqueKey":"promotion_usages.oneOf.0.items.[INDEX].promotion_id","typeLabel":"string\u003cuuid>"},"discount_amount":{"type":"number","format":"float","description":"Discount amount attributed to this promotion","example":150,"isRequired":true,"uniqueKey":"promotion_usages.oneOf.0.items.[INDEX].discount_amount","typeLabel":"number\u003cfloat>"}},"uniqueKey":"promotion_usages.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"promotion_usages.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Promotion usages applied to this order (tracked when payment_status is paid)","items":{"type":"object","required":["promotion_id","discount_amount"],"properties":{"promotion_id":{"type":"string","format":"uuid","description":"ID of the promotion that was applied","example":"7a1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e"},"discount_amount":{"type":"number","format":"float","description":"Discount amount attributed to this promotion","example":150}}},"uniqueKey":"promotion_usages.oneOf.1","typeLabel":"null"}],"uniqueKey":"promotion_usages","typeLabel":"object[] | null"},"campaign_ids":{"oneOf":[{"type":"array","description":"Campaigns to apply to this order, by id. The discount each one grants is computed\nserver-side against the campaign's own rules and its remaining budget, so a\ncampaign that has spent its budget adds nothing. Once the order is paid, what\neach campaign granted is drawn from its budget.\n","items":{"type":"string","format":"uuid","uniqueKey":"campaign_ids.oneOf.0.items.[INDEX]","typeLabel":"string\u003cuuid>"},"example":["3f1c8a4e-9d2b-4c17-8f5a-2b6d1e7c9a04"],"uniqueKey":"campaign_ids.oneOf.0","typeLabel":"string\u003cuuid>[]"},{"type":"null","description":"Campaigns to apply to this order, by id. The discount each one grants is computed\nserver-side against the campaign's own rules and its remaining budget, so a\ncampaign that has spent its budget adds nothing. Once the order is paid, what\neach campaign granted is drawn from its budget.\n","items":{"type":"string","format":"uuid"},"example":["3f1c8a4e-9d2b-4c17-8f5a-2b6d1e7c9a04"],"uniqueKey":"campaign_ids.oneOf.1","typeLabel":"null"}],"uniqueKey":"campaign_ids","typeLabel":"string\u003cuuid>[] | null"},"apply_store_credit":{"type":"boolean","description":"Apply the customer's redeemable store credit to this order. When\ntrue (and the order has a `customer_id`), store credit is spent\nagainst the order total, capped at the total. The amount actually\napplied is returned as `store_credit_applied`. Requires a customer.\n","example":true,"uniqueKey":"apply_store_credit","typeLabel":"boolean"},"store_credit_amount":{"type":"number","format":"float","description":"Optional cap on how much store credit to apply. When omitted (and\n`apply_store_credit` is true) up to the full order total is applied.\nThe applied amount never exceeds the available balance or the total.\n","example":25,"uniqueKey":"store_credit_amount","typeLabel":"number\u003cfloat>"},"order_number":{"type":"string","description":"Your own order reference. When omitted, Galactic Core generates one. Use this to keep order numbers aligned with a system you already run.","example":"ORD-10432","uniqueKey":"order_number","typeLabel":"string"},"currency":{"type":"string","description":"ISO 4217 currency code the order is priced in. When omitted, the store's default storefront currency is used. Set it when you present prices in a currency the shopper selected, so the order is recorded in the same currency it was paid in.","example":"USD","uniqueKey":"currency","typeLabel":"string"},"reservation_ids":{"type":"array","description":"Stock reservation ids returned by `POST /v1/checkout/reserve`. Supplying them commits the stock already held for this shopper instead of decrementing it again, which is what keeps a high-demand drop from overselling between reservation and payment. On a `pending` order the ids are kept with the order: they are committed when the order is paid and released when it is cancelled or its payment fails. Only holds on the order's own items are committed. At most 100 ids.","items":{"type":"string","uniqueKey":"reservation_ids.items.[INDEX]","typeLabel":"string"},"example":["8f2c1a9b-4d7e-4f10-9a3b-2c5e7f1d0a44"],"uniqueKey":"reservation_ids","typeLabel":"string[]"},"shipping_latitude":{"type":"number","format":"float","description":"Delivery latitude, used to resolve the delivery zone or distance tier that prices shipping. Send it with `shipping_longitude` when the shopper's coordinates are known; the server re-derives the shipping cost from them rather than trusting a client total.","example":40.7128,"uniqueKey":"shipping_latitude","typeLabel":"number\u003cfloat>"},"shipping_longitude":{"type":"number","format":"float","description":"Delivery longitude. See `shipping_latitude`.","example":-74.006,"uniqueKey":"shipping_longitude","typeLabel":"number\u003cfloat>"},"shippo_rate_id":{"type":"string","description":"The id of a carrier option from the store's connected carrier account. Equivalent to `shipping_rate_id` with `shipping_rate_source: shippo`. The option is fetched again and checked before it is charged, so a modified, stale or foreign option is rejected.","example":"rate_8f2c1a9b4d7e4f109a3b2c5e7f1d0a44","uniqueKey":"shippo_rate_id","typeLabel":"string"},"shipping_rate_id":{"type":"string","description":"The id of the carrier option the shopper chose, as returned in `rates[]` by `POST /v1/shipping/calculate`. Send with `shipping_rate_source`.","example":"rate_8f2c1a9b4d7e4f109a3b2c5e7f1d0a44","uniqueKey":"shipping_rate_id","typeLabel":"string"},"shipping_rate_source":{"type":"string","enum":["shippo","carrier","custom"],"description":"Where the chosen option came from — its `source` in `rates[]`: the store's carrier account (`shippo`, or the neutral spelling `carrier`) or its custom shipping extension (`custom`).","example":"shippo","uniqueKey":"shipping_rate_source","typeLabel":"enum\u003cstring>"},"shipping_parcel":{"type":"object","description":"The parcel the option was quoted for. Required with `shipping_rate_source: custom`, because the extension is asked for its options again to check the one chosen.","properties":{"length":{"type":"string","example":"10","uniqueKey":"shipping_parcel.length","typeLabel":"string"},"width":{"type":"string","example":"8","uniqueKey":"shipping_parcel.width","typeLabel":"string"},"height":{"type":"string","example":"4","uniqueKey":"shipping_parcel.height","typeLabel":"string"},"distance_unit":{"type":"string","example":"in","uniqueKey":"shipping_parcel.distance_unit","typeLabel":"string"},"weight":{"type":"string","example":"2","uniqueKey":"shipping_parcel.weight","typeLabel":"string"},"mass_unit":{"type":"string","example":"lb","uniqueKey":"shipping_parcel.mass_unit","typeLabel":"string"}},"uniqueKey":"shipping_parcel","typeLabel":"object"},"fulfillment_method":{"type":"string","enum":["delivery","pickup","none"],"description":"How the shopper receives the order: delivered to `shipping_address` (`delivery`, the default when something ships), collected at one of the store's locations (`pickup`), or `none` when nothing ships. The server derives the method from the items. When every item is a download, a code, an event ticket or a service, the order is stored as `none` whatever was sent; when any item ships, `none` is refused with `400 fulfillment_method_invalid`.","example":"delivery","uniqueKey":"fulfillment_method","typeLabel":"enum\u003cstring>"},"pickup_location_id":{"type":"string","format":"uuid","description":"The location to collect from, on a pickup order — a location `id` from `pickup_locations` (`GET /v1/shipping/zones`) or from a pickup option's `location` (`POST /v1/shipping/calculate`). When omitted on a pickup order, the store's primary pickup location is used.","example":"3d5c7a10-8b2e-4f61-9c4d-1a2b3c4d5e6f","uniqueKey":"pickup_location_id","typeLabel":"string\u003cuuid>"},"shipping_option_id":{"type":"string","maxLength":60,"description":"The `id` of the option the shopper chose from `options[]` in `POST /v1/shipping/calculate` — `place` for standard delivery, `opt:\u003cid>` for a named delivery option such as Express, or `pickup:\u003clocation id>` on a pickup order. `shipping_amount` must equal that option's fee for this order.","example":"opt:9a1f3c2e-5b7d-4e8a-a2c4-6d8e0f1a3b5c","uniqueKey":"shipping_option_id","typeLabel":"string"},"shipping_address_from":{"type":"object","description":"The ship-from address the option was quoted with, when one was sent to `POST /v1/shipping/calculate` as `address_from`.","uniqueKey":"shipping_address_from","typeLabel":"object"},"attribution":{"oneOf":[{"type":"object","description":"Where this order came from, recorded for the merchant's analytics. Accepts the fields below; the same fields are also read from the top level of the request body if you already send them there. Promotions that actually applied are recorded from the server-validated result, so `promotion_ids` never inflates what a shopper received.","properties":{"session_id":{"type":"string","description":"The shopper's storefront session, linking the order to their visit.","example":"s_4d7e2f10","uniqueKey":"attribution.oneOf.0.session_id","typeLabel":"string"},"utm_source":{"type":"string","example":"google","uniqueKey":"attribution.oneOf.0.utm_source","typeLabel":"string"},"utm_medium":{"type":"string","example":"cpc","uniqueKey":"attribution.oneOf.0.utm_medium","typeLabel":"string"},"utm_campaign":{"type":"string","example":"spring-sale","uniqueKey":"attribution.oneOf.0.utm_campaign","typeLabel":"string"},"utm_term":{"type":"string","description":"The paid keyword the shopper searched, so the merchant can see which terms earn orders.","example":"running shoes","uniqueKey":"attribution.oneOf.0.utm_term","typeLabel":"string"},"utm_content":{"type":"string","description":"The creative or placement the shopper clicked, for comparing one ad variant against another.","example":"hero-video-a","uniqueKey":"attribution.oneOf.0.utm_content","typeLabel":"string"},"gbraid":{"type":"string","description":"The Google ad click id for iOS app-to-web traffic, kept on the order beside `gclid`.","uniqueKey":"attribution.oneOf.0.gbraid","typeLabel":"string"},"wbraid":{"type":"string","description":"The Google ad click id for iOS web-to-app traffic, kept on the order beside `gclid`.","uniqueKey":"attribution.oneOf.0.wbraid","typeLabel":"string"},"fbc":{"type":"string","description":"The value of the shopper's `_fbc` browser cookie (`fb.\u003cn>.\u003ctimestamp>.\u003cclick id>`).","example":"fb.1.1763800000000.IwAR1abc","uniqueKey":"attribution.oneOf.0.fbc","typeLabel":"string"},"fbp":{"type":"string","description":"The value of the shopper's `_fbp` browser cookie (`fb.\u003cn>.\u003ctimestamp>.\u003crandom number>`).","example":"fb.1.1763800000000.1234567890","uniqueKey":"attribution.oneOf.0.fbp","typeLabel":"string"},"clicked_at":{"type":"string","format":"date-time","description":"When the shopper last clicked the ad.","uniqueKey":"attribution.oneOf.0.clicked_at","typeLabel":"string\u003cdate-time>"},"referrer":{"type":"string","example":"https://www.google.com/","uniqueKey":"attribution.oneOf.0.referrer","typeLabel":"string"},"promotion_ids":{"type":"array","items":{"type":"string","uniqueKey":"attribution.oneOf.0.promotion_ids.items.[INDEX]","typeLabel":"string"},"description":"Promotions the storefront applied.","uniqueKey":"attribution.oneOf.0.promotion_ids","typeLabel":"string[]"},"pricing_rule_ids":{"type":"array","items":{"type":"string","uniqueKey":"attribution.oneOf.0.pricing_rule_ids.items.[INDEX]","typeLabel":"string"},"description":"Dynamic-pricing rules the storefront applied.","uniqueKey":"attribution.oneOf.0.pricing_rule_ids","typeLabel":"string[]"},"content_id":{"type":"string","description":"The blog post or lookbook the shopper came from, for the content funnel.","uniqueKey":"attribution.oneOf.0.content_id","typeLabel":"string"},"content_type":{"type":"string","enum":["post","lookbook"],"uniqueKey":"attribution.oneOf.0.content_type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"attribution.oneOf.0","typeLabel":"object"},{"type":"null","description":"Where this order came from, recorded for the merchant's analytics. Accepts the fields below; the same fields are also read from the top level of the request body if you already send them there. Promotions that actually applied are recorded from the server-validated result, so `promotion_ids` never inflates what a shopper received.","properties":{"session_id":{"type":"string","description":"The shopper's storefront session, linking the order to their visit.","example":"s_4d7e2f10"},"utm_source":{"type":"string","example":"google"},"utm_medium":{"type":"string","example":"cpc"},"utm_campaign":{"type":"string","example":"spring-sale"},"utm_term":{"type":"string","description":"The paid keyword the shopper searched, so the merchant can see which terms earn orders.","example":"running shoes"},"utm_content":{"type":"string","description":"The creative or placement the shopper clicked, for comparing one ad variant against another.","example":"hero-video-a"},"gbraid":{"type":"string","description":"The Google ad click id for iOS app-to-web traffic, kept on the order beside `gclid`."},"wbraid":{"type":"string","description":"The Google ad click id for iOS web-to-app traffic, kept on the order beside `gclid`."},"fbc":{"type":"string","description":"The value of the shopper's `_fbc` browser cookie (`fb.\u003cn>.\u003ctimestamp>.\u003cclick id>`).","example":"fb.1.1763800000000.IwAR1abc"},"fbp":{"type":"string","description":"The value of the shopper's `_fbp` browser cookie (`fb.\u003cn>.\u003ctimestamp>.\u003crandom number>`).","example":"fb.1.1763800000000.1234567890"},"clicked_at":{"type":"string","format":"date-time","description":"When the shopper last clicked the ad."},"referrer":{"type":"string","example":"https://www.google.com/"},"promotion_ids":{"type":"array","items":{"type":"string"},"description":"Promotions the storefront applied."},"pricing_rule_ids":{"type":"array","items":{"type":"string"},"description":"Dynamic-pricing rules the storefront applied."},"content_id":{"type":"string","description":"The blog post or lookbook the shopper came from, for the content funnel."},"content_type":{"type":"string","enum":["post","lookbook"]}},"uniqueKey":"attribution.oneOf.1","typeLabel":"null"}],"uniqueKey":"attribution","typeLabel":"object | null"},"gclid":{"oneOf":[{"type":"string","description":"Google ad click id, when the shopper arrived from a Google ad. On a paid order this lets the merchant's Google advertising get credit for the sale, and is kept on the order so the merchant's own reports can attribute revenue and profit to the ad that earned it rather than relying on the ad platform's account. Forward the true captured value; omit if not present.","example":"Cj0KCQiA...gclid","uniqueKey":"gclid.oneOf.0","typeLabel":"string"},{"type":"null","description":"Google ad click id, when the shopper arrived from a Google ad. On a paid order this lets the merchant's Google advertising get credit for the sale, and is kept on the order so the merchant's own reports can attribute revenue and profit to the ad that earned it rather than relying on the ad platform's account. Forward the true captured value; omit if not present.","example":"Cj0KCQiA...gclid","uniqueKey":"gclid.oneOf.1","typeLabel":"null"}],"uniqueKey":"gclid","typeLabel":"string | null"},"fbclid":{"oneOf":[{"type":"string","description":"Meta (Facebook \u0026 Instagram) ad click id, when the shopper arrived from a Meta ad. On a paid order this lets the merchant's Meta advertising get credit for the sale. The conversion is sent server-side (Conversions API) and de-duplicated against the storefront's Meta Pixel by the order id, so it counts even when the browser blocks the Pixel. It is kept on the order so the merchant's own reports can attribute revenue and profit to the ad that earned it. Forward the true captured value; omit if not present.","example":"IwAR1abc...fbclid","uniqueKey":"fbclid.oneOf.0","typeLabel":"string"},{"type":"null","description":"Meta (Facebook \u0026 Instagram) ad click id, when the shopper arrived from a Meta ad. On a paid order this lets the merchant's Meta advertising get credit for the sale. The conversion is sent server-side (Conversions API) and de-duplicated against the storefront's Meta Pixel by the order id, so it counts even when the browser blocks the Pixel. It is kept on the order so the merchant's own reports can attribute revenue and profit to the ad that earned it. Forward the true captured value; omit if not present.","example":"IwAR1abc...fbclid","uniqueKey":"fbclid.oneOf.1","typeLabel":"null"}],"uniqueKey":"fbclid","typeLabel":"string | null"},"ad_consent":{"oneOf":[{"type":"object","description":"Advertising privacy-consent state captured at checkout, used to decide whether a conversion may be reported to an ad platform for this shopper's region (required for EEA shoppers; UK/Swiss records are not dropped for a missing signal). Always forward the true captured values — never guess.","properties":{"ad_user_data":{"type":"string","enum":["granted","denied","unspecified"],"example":"granted","uniqueKey":"ad_consent.oneOf.0.ad_user_data","typeLabel":"enum\u003cstring>"},"ad_personalization":{"type":"string","enum":["granted","denied","unspecified"],"example":"granted","uniqueKey":"ad_consent.oneOf.0.ad_personalization","typeLabel":"enum\u003cstring>"},"jurisdiction":{"type":"string","description":"The shopper's region bucket (e.g. EEA, UK, CH, US).","example":"US","uniqueKey":"ad_consent.oneOf.0.jurisdiction","typeLabel":"string"}},"uniqueKey":"ad_consent.oneOf.0","typeLabel":"object"},{"type":"null","description":"Advertising privacy-consent state captured at checkout, used to decide whether a conversion may be reported to an ad platform for this shopper's region (required for EEA shoppers; UK/Swiss records are not dropped for a missing signal). Always forward the true captured values — never guess.","properties":{"ad_user_data":{"type":"string","enum":["granted","denied","unspecified"],"example":"granted"},"ad_personalization":{"type":"string","enum":["granted","denied","unspecified"],"example":"granted"},"jurisdiction":{"type":"string","description":"The shopper's region bucket (e.g. EEA, UK, CH, US).","example":"US"}},"uniqueKey":"ad_consent.oneOf.1","typeLabel":"null"}],"uniqueKey":"ad_consent","typeLabel":"object | null"},"subscribe_save":{"type":"object","description":"Subscribes the shopper to the lines of this order that a Subscribe \u0026 Save offer covers.\nThe order is priced and charged as a normal order with the offer's first-order discount.\nThe subscription starts when the order is paid, never before, and its later deliveries\nare created as separate orders on the interval the shopper chose.\n\n- A subscription belongs to a signed-in shopper: send the shopper's `customer_id`. An\n order without one is refused with `409 account_required`.\n- The offer decides which lines are subscribed; an offer that is not live, or that\n covers none of the order's lines, is refused with `400 subscribe_save_not_applicable`.\n Use `POST /v1/subscribe-save/quote` to show the shopper the price before ordering.\n- `discount_amount` is checked against the discount the offer grants, together with any\n promotions the offer allows to stack. It may be lower, never higher\n (`400 discount_invalid`).\n- When the offer includes free shipping, `shipping_amount` is `0`.\n- To save the shopper's card for the later deliveries, request it when the payment is\n started (`save_payment_method` on `POST /v1/payments/initialize`).\n","required":["offer_id","interval_unit","interval_count","consent"],"properties":{"offer_id":{"type":"string","format":"uuid","description":"The offer the shopper chose, from `GET /v1/subscribe-save/offers`.","example":"4c1c7b9e-2f58-4f43-9d3a-6f0e2a8b1c11","isRequired":true,"uniqueKey":"subscribe_save.offer_id","typeLabel":"string\u003cuuid>"},"interval_unit":{"type":"string","enum":["week","month"],"description":"The unit of the delivery interval. The interval must be one the offer lists.","example":"month","isRequired":true,"uniqueKey":"subscribe_save.interval_unit","typeLabel":"enum\u003cstring>"},"interval_count":{"type":"integer","minimum":1,"maximum":52,"description":"How many units between deliveries. `interval_unit` `month` with `interval_count` `1` is every month.","example":1,"isRequired":true,"uniqueKey":"subscribe_save.interval_count","typeLabel":"integer"},"consent":{"type":"object","description":"The shopper's explicit acceptance of the Subscribe \u0026 Save terms. Store it exactly as shown to the shopper; it is kept with the subscription as the record of what was agreed. The box is never pre-ticked.","required":["text","text_version","accepted_at"],"properties":{"text":{"type":"string","minLength":20,"maxLength":4000,"description":"The wording the shopper saw next to the subscribe button.","example":"Deliver every month at the subscriber price. Renews until you cancel. Cancel any time from your account or from any email.","isRequired":true,"uniqueKey":"subscribe_save.consent.text","typeLabel":"string"},"text_version":{"type":"string","minLength":1,"maxLength":40,"description":"Your identifier for this version of the wording.","example":"2026-10","isRequired":true,"uniqueKey":"subscribe_save.consent.text_version","typeLabel":"string"},"accepted_at":{"type":"string","format":"date-time","description":"When the shopper accepted. Must not be in the future.","example":"2026-10-28T09:30:00Z","isRequired":true,"uniqueKey":"subscribe_save.consent.accepted_at","typeLabel":"string\u003cdate-time>"}},"isRequired":true,"uniqueKey":"subscribe_save.consent","typeLabel":"object"}},"uniqueKey":"subscribe_save","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"customer_email":"john.doe@example.com","customer_name":"John Doe","customer_phone":"+12125550142","billing_address":{"street":"350 Fifth Avenue","city":"New York","state":"NY","zip":"10118","country":"US"},"shipping_address":{"street":"350 Fifth Avenue","city":"New York","state":"NY","zip":"10118","country":"US"},"items":[{"product_id":"715b8c10-eb11-4289-8c0e-2966e78cf9a5","variant_id":"15ca5a86-4b1b-47c3-8762-a1aa43941565","product_name":"Apple MacBook Pro","product_sku":"APP-MBP-13","quantity":1,"unit_price":1999,"total_price":1999}],"payment_method":"card","payment_status":"paid","subtotal":1999,"shipping_amount":5.99,"discount_amount":0,"total_amount":2004.99,"fulfillment_method":"delivery","shipping_option_id":"place","shipping_metadata":{"fee":5.99,"tier_name":"Local (within 10 km)","distance_meters":8548,"is_free":false,"reason":"8.5 km away","applied_rule":"distance"},"notes":"Leave with front desk"},"examples":{"Example":{"title":"Example","value":{"customer_email":"john.doe@example.com","customer_name":"John Doe","customer_phone":"+12125550142","billing_address":{"street":"350 Fifth Avenue","city":"New York","state":"NY","zip":"10118","country":"US"},"shipping_address":{"street":"350 Fifth Avenue","city":"New York","state":"NY","zip":"10118","country":"US"},"items":[{"product_id":"715b8c10-eb11-4289-8c0e-2966e78cf9a5","variant_id":"15ca5a86-4b1b-47c3-8762-a1aa43941565","product_name":"Apple MacBook Pro","product_sku":"APP-MBP-13","quantity":1,"unit_price":1999,"total_price":1999}],"payment_method":"card","payment_status":"paid","subtotal":1999,"shipping_amount":5.99,"discount_amount":0,"total_amount":2004.99,"fulfillment_method":"delivery","shipping_option_id":"place","shipping_metadata":{"fee":5.99,"tier_name":"Local (within 10 km)","distance_meters":8548,"is_free":false,"reason":"8.5 km away","applied_rule":"distance"},"notes":"Leave with front desk"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"d522b7ae-f922-461a-a508-fc280a1d7f74":{"description":"The `Idempotency-Key` has already been used for this store, so the order it created is\nreturned instead of a new one being made. The body is the order resource, exactly as\n`GET /v1/orders/{id}` would return it — note this differs from the `201` envelope, which\nnests the order under an `order` property.\n\nRetrying a create with the same key is always safe: concurrent retries resolve to the\nsame order, and only the first request receives `201`.\n","headers":{"Tybrite-Environment":{"description":"Confirms which environment your API key resolved to. Use this to verify that test keys\nare hitting sandbox data and live keys are hitting production data.\n\n- `production` — requests are scoped to live data; real orders, customers, and payments\n- `sandbox` — requests are scoped to isolated test data; no real money is moved\n\nPresent on every authenticated response, including error responses.\n","schema":{"type":"string","enum":["production","sandbox"]},"example":"sandbox"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"id","typeLabel":"string\u003cuuid>"},"order_number":{"type":"string","example":"ORD-2026-001234","uniqueKey":"order_number","typeLabel":"string"},"customer_id":{"type":"string","format":"uuid","uniqueKey":"customer_id","typeLabel":"string\u003cuuid>"},"customer_email":{"type":"string","format":"email","uniqueKey":"customer_email","typeLabel":"string\u003cemail>"},"customer_phone":{"type":"string","uniqueKey":"customer_phone","typeLabel":"string"},"customer_name":{"type":"string","uniqueKey":"customer_name","typeLabel":"string"},"order_status":{"type":"string","enum":["pending","confirmed","processing","shipped","delivered","cancelled"],"example":"pending","uniqueKey":"order_status","typeLabel":"enum\u003cstring>"},"payment_status":{"type":"string","enum":["pending","paid","failed","refunded"],"example":"pending","uniqueKey":"payment_status","typeLabel":"enum\u003cstring>"},"payment_method":{"type":"string","description":"Method used for payment: a built-in method (`card`, `stripe`, `paypal`, `paystack`, `mpesa`, `mpesa_c2b`, `cash`, `bank_transfer`, `free`) or the identifier of one of the store's own payment providers.","example":"stripe","uniqueKey":"payment_method","typeLabel":"string"},"payment_reference":{"type":"string","uniqueKey":"payment_reference","typeLabel":"string"},"subtotal":{"type":"number","format":"float","example":1999.98,"uniqueKey":"subtotal","typeLabel":"number\u003cfloat>"},"tax_amount":{"type":"number","format":"float","example":159.99,"uniqueKey":"tax_amount","typeLabel":"number\u003cfloat>"},"tax_breakdown":{"oneOf":[{"type":"array","description":"Per-jurisdiction tax detail when tax was calculated automatically for the shipping destination (one entry per taxing jurisdiction). Null when a flat store rate was used.","items":{"type":"object","properties":{"country":{"type":"string","example":"GB","uniqueKey":"tax_breakdown.oneOf.0.items.[INDEX].country","typeLabel":"string"},"region":{"type":"string","example":"GB","uniqueKey":"tax_breakdown.oneOf.0.items.[INDEX].region","typeLabel":"string"},"jurisName":{"type":"string","example":"UNITED KINGDOM","uniqueKey":"tax_breakdown.oneOf.0.items.[INDEX].jurisName","typeLabel":"string"},"taxName":{"type":"string","example":"Standard Rate","uniqueKey":"tax_breakdown.oneOf.0.items.[INDEX].taxName","typeLabel":"string"},"rate":{"type":"number","format":"float","example":0.2,"uniqueKey":"tax_breakdown.oneOf.0.items.[INDEX].rate","typeLabel":"number\u003cfloat>"},"taxable":{"type":"number","format":"float","example":100,"uniqueKey":"tax_breakdown.oneOf.0.items.[INDEX].taxable","typeLabel":"number\u003cfloat>"},"tax":{"type":"number","format":"float","example":20,"uniqueKey":"tax_breakdown.oneOf.0.items.[INDEX].tax","typeLabel":"number\u003cfloat>"}},"uniqueKey":"tax_breakdown.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"tax_breakdown.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per-jurisdiction tax detail when tax was calculated automatically for the shipping destination (one entry per taxing jurisdiction). Null when a flat store rate was used.","items":{"type":"object","properties":{"country":{"type":"string","example":"GB"},"region":{"type":"string","example":"GB"},"jurisName":{"type":"string","example":"UNITED KINGDOM"},"taxName":{"type":"string","example":"Standard Rate"},"rate":{"type":"number","format":"float","example":0.2},"taxable":{"type":"number","format":"float","example":100},"tax":{"type":"number","format":"float","example":20}}},"uniqueKey":"tax_breakdown.oneOf.1","typeLabel":"null"}],"uniqueKey":"tax_breakdown","typeLabel":"object[] | null"},"tax_source":{"oneOf":[{"type":"string","enum":["automatic","fallback","manual",null],"description":"How the tax figure was produced — `automatic` (jurisdiction-accurate calculation for the destination), `fallback` (automatic calculation was unavailable, so the store's configured rate was used), or `manual` (the store's configured rate).","example":"automatic","uniqueKey":"tax_source.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["automatic","fallback","manual",null],"description":"How the tax figure was produced — `automatic` (jurisdiction-accurate calculation for the destination), `fallback` (automatic calculation was unavailable, so the store's configured rate was used), or `manual` (the store's configured rate).","example":"automatic","uniqueKey":"tax_source.oneOf.1","typeLabel":"null"}],"uniqueKey":"tax_source","typeLabel":"enum\u003cstring> | null"},"shipping_amount":{"type":"number","format":"float","example":15,"uniqueKey":"shipping_amount","typeLabel":"number\u003cfloat>"},"discount_amount":{"type":"number","format":"float","example":0,"uniqueKey":"discount_amount","typeLabel":"number\u003cfloat>"},"total_amount":{"type":"number","format":"float","example":2174.97,"uniqueKey":"total_amount","typeLabel":"number\u003cfloat>"},"billing_address":{"type":"object","properties":{"street":{"type":"string","example":"123 Main St","uniqueKey":"billing_address.street","typeLabel":"string"},"city":{"type":"string","example":"New York","uniqueKey":"billing_address.city","typeLabel":"string"},"state":{"type":"string","example":"NY","uniqueKey":"billing_address.state","typeLabel":"string"},"zip":{"type":"string","example":"10001","uniqueKey":"billing_address.zip","typeLabel":"string"},"country":{"type":"string","example":"US","uniqueKey":"billing_address.country","typeLabel":"string"}},"uniqueKey":"billing_address","typeLabel":"object"},"shipping_address":{"oneOf":[{"type":"object","description":"Where the order goes. `null` on an order with `fulfillment_method` `none`, where nothing is shipped.","properties":{"street":{"type":"string","example":"123 Main St","uniqueKey":"shipping_address.oneOf.0.street","typeLabel":"string"},"city":{"type":"string","example":"New York","uniqueKey":"shipping_address.oneOf.0.city","typeLabel":"string"},"state":{"type":"string","example":"NY","uniqueKey":"shipping_address.oneOf.0.state","typeLabel":"string"},"zip":{"type":"string","example":"10001","uniqueKey":"shipping_address.oneOf.0.zip","typeLabel":"string"},"country":{"type":"string","example":"US","uniqueKey":"shipping_address.oneOf.0.country","typeLabel":"string"},"type":{"type":"string","enum":["pickup"],"description":"Present, as `pickup`, only on a pickup order.","uniqueKey":"shipping_address.oneOf.0.type","typeLabel":"enum\u003cstring>"},"name":{"type":"string","example":"Brooklyn store","uniqueKey":"shipping_address.oneOf.0.name","typeLabel":"string"},"location_id":{"type":"string","format":"uuid","example":"3d5c7a10-8b2e-4f61-9c4d-1a2b3c4d5e6f","uniqueKey":"shipping_address.oneOf.0.location_id","typeLabel":"string\u003cuuid>"},"line1":{"oneOf":[{"type":"string","example":"145 Atlantic Avenue","uniqueKey":"shipping_address.oneOf.0.line1.oneOf.0","typeLabel":"string"},{"type":"null","example":"145 Atlantic Avenue","uniqueKey":"shipping_address.oneOf.0.line1.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_address.oneOf.0.line1","typeLabel":"string | null"},"line2":{"oneOf":[{"type":"string","uniqueKey":"shipping_address.oneOf.0.line2.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"shipping_address.oneOf.0.line2.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_address.oneOf.0.line2","typeLabel":"string | null"},"postal_code":{"oneOf":[{"type":"string","example":"11201","uniqueKey":"shipping_address.oneOf.0.postal_code.oneOf.0","typeLabel":"string"},{"type":"null","example":"11201","uniqueKey":"shipping_address.oneOf.0.postal_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_address.oneOf.0.postal_code","typeLabel":"string | null"}},"uniqueKey":"shipping_address.oneOf.0","typeLabel":"object"},{"type":"null","description":"Where the order goes. `null` on an order with `fulfillment_method` `none`, where nothing is shipped.","uniqueKey":"shipping_address.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_address","typeLabel":"object | null"},"fulfillment_method":{"type":"string","enum":["delivery","pickup","none"],"example":"delivery","description":"Whether the order is delivered to the shopper, collected at one of the store's locations, or has nothing to ship (`none`: downloads, codes, event tickets and services only).","uniqueKey":"fulfillment_method","typeLabel":"enum\u003cstring>"},"order_type":{"type":"string","enum":["retail","b2b"],"example":"retail","description":"`b2b` for a wholesale order placed by a buyer account, `retail` for every other order. The `order.created`, `order.paid`, `order.fulfilled`, `order.cancelled`, `order.updated` and `order.refunded` events carry the same field.","uniqueKey":"order_type","typeLabel":"enum\u003cstring>"},"pickup_location_id":{"oneOf":[{"type":"string","format":"uuid","example":null,"description":"The location the shopper collects from, on a pickup order. Null on a delivery order.","uniqueKey":"pickup_location_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","example":null,"description":"The location the shopper collects from, on a pickup order. Null on a delivery order.","uniqueKey":"pickup_location_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"pickup_location_id","typeLabel":"string\u003cuuid> | null"},"fulfillment_location_id":{"oneOf":[{"type":"string","format":"uuid","example":"7b2e9c41-0d3f-4a58-b6e1-2f4a6c8e0b13","description":"The store location the order is fulfilled from: the pickup location on a pickup order, or the location deliveries leave from when the store delivers from its nearest location. Null when the store does not route orders between locations.","uniqueKey":"fulfillment_location_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","example":"7b2e9c41-0d3f-4a58-b6e1-2f4a6c8e0b13","description":"The store location the order is fulfilled from: the pickup location on a pickup order, or the location deliveries leave from when the store delivers from its nearest location. Null when the store does not route orders between locations.","uniqueKey":"fulfillment_location_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"fulfillment_location_id","typeLabel":"string\u003cuuid> | null"},"shipping_option_id":{"oneOf":[{"type":"string","example":"place","description":"The shipping option the order was placed with, as returned by `POST /v1/shipping/calculate` (`place`, `opt:\u003cid>` or `pickup:\u003clocation id>`). Null when none was named.","uniqueKey":"shipping_option_id.oneOf.0","typeLabel":"string"},{"type":"null","example":"place","description":"The shipping option the order was placed with, as returned by `POST /v1/shipping/calculate` (`place`, `opt:\u003cid>` or `pickup:\u003clocation id>`). Null when none was named.","uniqueKey":"shipping_option_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_option_id","typeLabel":"string | null"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"\\items.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"order_id":{"type":"string","format":"uuid","uniqueKey":"\\items.items.[INDEX].order_id","typeLabel":"string\u003cuuid>"},"variant_id":{"oneOf":[{"type":"string","format":"uuid","description":"The variant (SKU) this line sold.","uniqueKey":"\\items.items.[INDEX].variant_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The variant (SKU) this line sold.","uniqueKey":"\\items.items.[INDEX].variant_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].variant_id","typeLabel":"string\u003cuuid> | null"},"sku":{"oneOf":[{"type":"string","description":"The variant's SKU, recorded on the line when the order was placed.","example":"FH-FAS-03-32","uniqueKey":"\\items.items.[INDEX].sku.oneOf.0","typeLabel":"string"},{"type":"null","description":"The variant's SKU, recorded on the line when the order was placed.","example":"FH-FAS-03-32","uniqueKey":"\\items.items.[INDEX].sku.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].sku","typeLabel":"string | null"},"variant_name":{"oneOf":[{"type":"string","description":"The variant's name, such as `32` or `Large`.","example":"32","uniqueKey":"\\items.items.[INDEX].variant_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The variant's name, such as `32` or `Large`.","example":"32","uniqueKey":"\\items.items.[INDEX].variant_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].variant_name","typeLabel":"string | null"},"options":{"oneOf":[{"type":"object","additionalProperties":true,"description":"The variant's option values, such as `{ \"Size\": \"32\" }`. `null` for a variant with no options.","example":{"Size":"32"},"uniqueKey":"\\items.items.[INDEX].options.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"description":"The variant's option values, such as `{ \"Size\": \"32\" }`. `null` for a variant with no options.","example":{"Size":"32"},"uniqueKey":"\\items.items.[INDEX].options.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].options","typeLabel":"object | null"},"product_options":{"oneOf":[{"type":"object","additionalProperties":true,"description":"The variant's option values as recorded on the line when the order was placed.","uniqueKey":"\\items.items.[INDEX].product_options.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"description":"The variant's option values as recorded on the line when the order was placed.","uniqueKey":"\\items.items.[INDEX].product_options.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].product_options","typeLabel":"object | null"},"custom_fields":{"type":"array","description":"Per-line fields the merchant defined — a personalisation or engraving carried on this line rather than on the order. Only fields the merchant published appear here; the merchant controls the names and how many\nexist, so render the array rather than reading fixed keys.\n","items":{"type":"object","description":"One merchant-defined field and its value on a record. Definitions are authored by the merchant (or by\ntheir platform operator), so the set varies per store and per entity.\n","properties":{"field_name":{"type":"string","description":"The machine name. Stable across edits to the label, so this is the one to key off in code.","example":"buyer_po","uniqueKey":"\\items.items.[INDEX].custom_fields.items.[INDEX].field_name","typeLabel":"string"},"field_label":{"type":"string","description":"What the merchant calls this field. The string to display.","example":"Buyer PO number","uniqueKey":"\\items.items.[INDEX].custom_fields.items.[INDEX].field_label","typeLabel":"string"},"field_type":{"type":"string","enum":["text","textarea","number","boolean","select","multiselect","date","json","dimensions","weight"],"description":"The shape of `value`: `multiselect` is an array of strings; `json`, `dimensions` and `weight` are\nobjects; the rest are scalars, and a `number` arrives as a number rather than as text.\n","example":"text","uniqueKey":"\\items.items.[INDEX].custom_fields.items.[INDEX].field_type","typeLabel":"enum\u003cstring>"},"unit_type":{"oneOf":[{"type":"string","description":"The unit a numeric or measurement field is expressed in, when the merchant set one.","example":null,"uniqueKey":"\\items.items.[INDEX].custom_fields.items.[INDEX].unit_type.oneOf.0","typeLabel":"string"},{"type":"null","description":"The unit a numeric or measurement field is expressed in, when the merchant set one.","example":null,"uniqueKey":"\\items.items.[INDEX].custom_fields.items.[INDEX].unit_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].custom_fields.items.[INDEX].unit_type","typeLabel":"string | null"},"value":{"description":"The stored value, in the shape implied by `field_type`. Null when the field is defined but has no\nvalue on this record — which is distinct from the field not existing.\n","example":"PO-2026-0819","uniqueKey":"\\items.items.[INDEX].custom_fields.items.[INDEX].value","typeLabel":"any"}},"uniqueKey":"\\items.items.[INDEX].custom_fields.items.[INDEX]","typeLabel":"object"},"uniqueKey":"\\items.items.[INDEX].custom_fields","typeLabel":"object[]"},"product_id":{"type":"string","format":"uuid","description":"Product UUID","uniqueKey":"\\items.items.[INDEX].product_id","typeLabel":"string\u003cuuid>"},"product_name":{"type":"string","uniqueKey":"\\items.items.[INDEX].product_name","typeLabel":"string"},"product_sku":{"oneOf":[{"type":"string","description":"The variant's SKU. Same value as `sku`.","uniqueKey":"\\items.items.[INDEX].product_sku.oneOf.0","typeLabel":"string"},{"type":"null","description":"The variant's SKU. Same value as `sku`.","uniqueKey":"\\items.items.[INDEX].product_sku.oneOf.1","typeLabel":"null"}],"uniqueKey":"\\items.items.[INDEX].product_sku","typeLabel":"string | null"},"fulfilment_kind":{"type":"string","enum":["shipped","digital","code","event_ticket","service"],"description":"How the line is delivered, as it was when the order was placed. A later change to the product does not change it. Orders placed before delivery kinds existed read as `shipped`.","example":"digital","uniqueKey":"\\items.items.[INDEX].fulfilment_kind","typeLabel":"enum\u003cstring>"},"quantity":{"type":"integer","example":2,"uniqueKey":"\\items.items.[INDEX].quantity","typeLabel":"integer"},"unit_price":{"type":"number","format":"float","example":999.99,"uniqueKey":"\\items.items.[INDEX].unit_price","typeLabel":"number\u003cfloat>"},"total_price":{"type":"number","format":"float","example":1999.98,"description":"`unit_price` × `quantity`, in the order's currency.","uniqueKey":"\\items.items.[INDEX].total_price","typeLabel":"number\u003cfloat>"}},"uniqueKey":"\\items.items.[INDEX]","typeLabel":"object"},"uniqueKey":"\\items","typeLabel":"object[]"},"status_notes":{"type":"array","description":"Customer-visible updates the merchant added as the order moved — the work between payment and\ndispatch (preparation, checks, packing) that a shopper otherwise hears nothing about. Oldest\nfirst, so it reads as a timeline. Internal notes are never included.\n","items":{"type":"object","description":"A customer-visible update on an order. One-way (store to shopper) and tied to the order itself —\ndistinct from a messaging thread, which is a two-way conversation.\n","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"status_notes.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"from_status":{"oneOf":[{"type":"string","description":"The status the order moved from, when the note accompanied a transition.","uniqueKey":"status_notes.items.[INDEX].from_status.oneOf.0","typeLabel":"string"},{"type":"null","description":"The status the order moved from, when the note accompanied a transition.","uniqueKey":"status_notes.items.[INDEX].from_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"status_notes.items.[INDEX].from_status","typeLabel":"string | null"},"to_status":{"oneOf":[{"type":"string","description":"The status the order moved to, when the note accompanied a transition.","uniqueKey":"status_notes.items.[INDEX].to_status.oneOf.0","typeLabel":"string"},{"type":"null","description":"The status the order moved to, when the note accompanied a transition.","uniqueKey":"status_notes.items.[INDEX].to_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"status_notes.items.[INDEX].to_status","typeLabel":"string | null"},"body":{"type":"string","description":"The message shown to the shopper.","uniqueKey":"status_notes.items.[INDEX].body","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"status_notes.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"status_notes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"status_notes","typeLabel":"object[]"},"custom_fields":{"type":"array","description":"The merchant's own fields on this order, with their values — a buyer's purchase-order number, a\ncost centre, whatever the merchant defined. Only fields the merchant published appear here; one\nholding an internal note or a cost stays in the admin. Empty when the merchant has defined none.\n\nThe merchant controls the names and how many exist, so render the array rather than reading fixed\nkeys: `field_label` is the heading to show, and `field_type` gives the shape of `value`.\n","items":{"type":"object","description":"One merchant-defined field and its value on a record. Definitions are authored by the merchant (or by\ntheir platform operator), so the set varies per store and per entity.\n","properties":{"field_name":{"type":"string","description":"The machine name. Stable across edits to the label, so this is the one to key off in code.","example":"buyer_po","uniqueKey":"custom_fields.items.[INDEX].field_name","typeLabel":"string"},"field_label":{"type":"string","description":"What the merchant calls this field. The string to display.","example":"Buyer PO number","uniqueKey":"custom_fields.items.[INDEX].field_label","typeLabel":"string"},"field_type":{"type":"string","enum":["text","textarea","number","boolean","select","multiselect","date","json","dimensions","weight"],"description":"The shape of `value`: `multiselect` is an array of strings; `json`, `dimensions` and `weight` are\nobjects; the rest are scalars, and a `number` arrives as a number rather than as text.\n","example":"text","uniqueKey":"custom_fields.items.[INDEX].field_type","typeLabel":"enum\u003cstring>"},"unit_type":{"oneOf":[{"type":"string","description":"The unit a numeric or measurement field is expressed in, when the merchant set one.","example":null,"uniqueKey":"custom_fields.items.[INDEX].unit_type.oneOf.0","typeLabel":"string"},{"type":"null","description":"The unit a numeric or measurement field is expressed in, when the merchant set one.","example":null,"uniqueKey":"custom_fields.items.[INDEX].unit_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields.items.[INDEX].unit_type","typeLabel":"string | null"},"value":{"description":"The stored value, in the shape implied by `field_type`. Null when the field is defined but has no\nvalue on this record — which is distinct from the field not existing.\n","example":"PO-2026-0819","uniqueKey":"custom_fields.items.[INDEX].value","typeLabel":"any"}},"uniqueKey":"custom_fields.items.[INDEX]","typeLabel":"object"},"uniqueKey":"custom_fields","typeLabel":"object[]"},"notes":{"type":"string","uniqueKey":"notes","typeLabel":"string"},"tracking_number":{"type":"string","uniqueKey":"tracking_number","typeLabel":"string"},"estimated_delivery":{"type":"string","format":"date-time","uniqueKey":"estimated_delivery","typeLabel":"string\u003cdate-time>"},"shipped_at":{"type":"string","format":"date-time","uniqueKey":"shipped_at","typeLabel":"string\u003cdate-time>"},"delivered_at":{"type":"string","format":"date-time","uniqueKey":"delivered_at","typeLabel":"string\u003cdate-time>"},"created_at":{"type":"string","format":"date-time","uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"environment":{"type":"string","enum":["production","sandbox"],"description":"Whether this order was created in the live or test environment. Sandbox orders are isolated from production data.","example":"production","uniqueKey":"environment","typeLabel":"enum\u003cstring>"},"shipping_metadata":{"oneOf":[{"type":"object","description":"How the shipping charge was arrived at. `shipping_source` and `shipping_rule` are recorded by the server when the order is created; the other fields are the details the storefront sent with the order.","properties":{"shipping_source":{"type":"string","enum":["shippo","custom","zone_tier","fallback","pickup","not_configured","unverified"],"example":"zone_tier","description":"What `shipping_amount` was checked against:\n- shippo: a carrier option from the store's connected carrier account\n- custom: a carrier option from the store's custom shipping extension\n- zone_tier: the store's delivery zone or distance rate for the address\n- fallback: the store's \"everywhere else\" rate\n- pickup: the pickup fee of the collection location\n- not_configured: the store has no delivery rates and the order carries no shipping charge\n- unverified: the amount could not be checked (the store has no delivery rates but a charge\n was sent, or the destination could not be located); the order was accepted as sent","uniqueKey":"shipping_metadata.oneOf.0.shipping_source","typeLabel":"enum\u003cstring>"},"shipping_rule":{"type":"string","enum":["zone","distance","fallback","none","pickup"],"example":"distance","description":"The rule that priced the order, when it was priced from the store's own rates or a pickup location. Absent for carrier options and unchecked amounts.","uniqueKey":"shipping_metadata.oneOf.0.shipping_rule","typeLabel":"enum\u003cstring>"},"fee":{"type":"number","format":"float","description":"Calculated shipping fee","example":100,"uniqueKey":"shipping_metadata.oneOf.0.fee","typeLabel":"number\u003cfloat>"},"zone_name":{"oneOf":[{"type":"string","description":"Delivery zone name (if zone-based pricing)","example":"CBD Zone","uniqueKey":"shipping_metadata.oneOf.0.zone_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Delivery zone name (if zone-based pricing)","example":"CBD Zone","uniqueKey":"shipping_metadata.oneOf.0.zone_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_metadata.oneOf.0.zone_name","typeLabel":"string | null"},"tier_name":{"oneOf":[{"type":"string","description":"Pricing tier name (if distance-based pricing)","example":"Within Manhattan","uniqueKey":"shipping_metadata.oneOf.0.tier_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Pricing tier name (if distance-based pricing)","example":"Within Manhattan","uniqueKey":"shipping_metadata.oneOf.0.tier_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_metadata.oneOf.0.tier_name","typeLabel":"string | null"},"distance_meters":{"oneOf":[{"type":"number","format":"float","description":"Calculated distance from store (if distance-based)","example":19.23,"uniqueKey":"shipping_metadata.oneOf.0.distance_meters.oneOf.0","typeLabel":"number\u003cfloat>"},{"type":"null","format":"float","description":"Calculated distance from store (if distance-based)","example":19.23,"uniqueKey":"shipping_metadata.oneOf.0.distance_meters.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_metadata.oneOf.0.distance_meters","typeLabel":"number\u003cfloat> | null"},"is_free":{"type":"boolean","description":"Whether free delivery was applied","example":false,"uniqueKey":"shipping_metadata.oneOf.0.is_free","typeLabel":"boolean"},"reason":{"type":"string","description":"Human-readable explanation of fee","example":"19 m away","uniqueKey":"shipping_metadata.oneOf.0.reason","typeLabel":"string"},"applied_rule":{"type":"string","enum":["zone","distance","fallback","none"],"description":"Which of the store's rates priced the address, as returned by `POST /v1/shipping/calculate`.","example":"distance","uniqueKey":"shipping_metadata.oneOf.0.applied_rule","typeLabel":"enum\u003cstring>"}},"uniqueKey":"shipping_metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"How the shipping charge was arrived at. `shipping_source` and `shipping_rule` are recorded by the server when the order is created; the other fields are the details the storefront sent with the order.","properties":{"shipping_source":{"type":"string","enum":["shippo","custom","zone_tier","fallback","pickup","not_configured","unverified"],"example":"zone_tier","description":"What `shipping_amount` was checked against:\n- shippo: a carrier option from the store's connected carrier account\n- custom: a carrier option from the store's custom shipping extension\n- zone_tier: the store's delivery zone or distance rate for the address\n- fallback: the store's \"everywhere else\" rate\n- pickup: the pickup fee of the collection location\n- not_configured: the store has no delivery rates and the order carries no shipping charge\n- unverified: the amount could not be checked (the store has no delivery rates but a charge\n was sent, or the destination could not be located); the order was accepted as sent"},"shipping_rule":{"type":"string","enum":["zone","distance","fallback","none","pickup"],"example":"distance","description":"The rule that priced the order, when it was priced from the store's own rates or a pickup location. Absent for carrier options and unchecked amounts."},"fee":{"type":"number","format":"float","description":"Calculated shipping fee","example":100},"zone_name":{"oneOf":[{"type":"string","description":"Delivery zone name (if zone-based pricing)","example":"CBD Zone"},{"type":"null","description":"Delivery zone name (if zone-based pricing)","example":"CBD Zone"}]},"tier_name":{"oneOf":[{"type":"string","description":"Pricing tier name (if distance-based pricing)","example":"Within Manhattan"},{"type":"null","description":"Pricing tier name (if distance-based pricing)","example":"Within Manhattan"}]},"distance_meters":{"oneOf":[{"type":"number","format":"float","description":"Calculated distance from store (if distance-based)","example":19.23},{"type":"null","format":"float","description":"Calculated distance from store (if distance-based)","example":19.23}]},"is_free":{"type":"boolean","description":"Whether free delivery was applied","example":false},"reason":{"type":"string","description":"Human-readable explanation of fee","example":"19 m away"},"applied_rule":{"type":"string","enum":["zone","distance","fallback","none"],"description":"Which of the store's rates priced the address, as returned by `POST /v1/shipping/calculate`.","example":"distance"}},"uniqueKey":"shipping_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"shipping_metadata","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"id":"7f3c1e88-2b4a-4c9e-9d21-5a6b7c8d9e01","order_number":"ORD-20260804-4f2a91","order_status":"processing","payment_status":"paid","total_amount":324.5},"examples":{"Example":{"title":"Example","value":{"id":"7f3c1e88-2b4a-4c9e-9d21-5a6b7c8d9e01","order_number":"ORD-20260804-4f2a91","order_status":"processing","payment_status":"paid","total_amount":324.5}}},"exampleType":"examples"}},"exampleType":"examples"},"f5ee71ed-201f-4e28-9741-12bc982d3b0c":{"description":"Order created successfully","headers":{"Tybrite-Environment":{"description":"Confirms which environment your API key resolved to. Use this to verify that test keys\nare hitting sandbox data and live keys are hitting production data.\n\n- `production` — requests are scoped to live data; real orders, customers, and payments\n- `sandbox` — requests are scoped to isolated test data; no real money is moved\n\nPresent on every authenticated response, including error responses.\n","schema":{"type":"string","enum":["production","sandbox"]},"example":"sandbox"}},"content":{"application/json":{"schema":{"type":"object","required":["order"],"properties":{"order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"order.id","typeLabel":"string\u003cuuid>"},"order_number":{"type":"string","example":"ORD-2026-001234","uniqueKey":"order.order_number","typeLabel":"string"},"customer_id":{"type":"string","format":"uuid","uniqueKey":"order.customer_id","typeLabel":"string\u003cuuid>"},"customer_email":{"type":"string","format":"email","uniqueKey":"order.customer_email","typeLabel":"string\u003cemail>"},"customer_phone":{"type":"string","uniqueKey":"order.customer_phone","typeLabel":"string"},"customer_name":{"type":"string","uniqueKey":"order.customer_name","typeLabel":"string"},"order_status":{"type":"string","enum":["pending","confirmed","processing","shipped","delivered","cancelled"],"example":"pending","uniqueKey":"order.order_status","typeLabel":"enum\u003cstring>"},"payment_status":{"type":"string","enum":["pending","paid","failed","refunded"],"example":"pending","uniqueKey":"order.payment_status","typeLabel":"enum\u003cstring>"},"payment_method":{"type":"string","description":"Method used for payment: a built-in method (`card`, `stripe`, `paypal`, `paystack`, `mpesa`, `mpesa_c2b`, `cash`, `bank_transfer`, `free`) or the identifier of one of the store's own payment providers.","example":"stripe","uniqueKey":"order.payment_method","typeLabel":"string"},"payment_reference":{"type":"string","uniqueKey":"order.payment_reference","typeLabel":"string"},"subtotal":{"type":"number","format":"float","example":1999.98,"uniqueKey":"order.subtotal","typeLabel":"number\u003cfloat>"},"tax_amount":{"type":"number","format":"float","example":159.99,"uniqueKey":"order.tax_amount","typeLabel":"number\u003cfloat>"},"tax_breakdown":{"oneOf":[{"type":"array","description":"Per-jurisdiction tax detail when tax was calculated automatically for the shipping destination (one entry per taxing jurisdiction). Null when a flat store rate was used.","items":{"type":"object","properties":{"country":{"type":"string","example":"GB","uniqueKey":"order.tax_breakdown.oneOf.0.items.[INDEX].country","typeLabel":"string"},"region":{"type":"string","example":"GB","uniqueKey":"order.tax_breakdown.oneOf.0.items.[INDEX].region","typeLabel":"string"},"jurisName":{"type":"string","example":"UNITED KINGDOM","uniqueKey":"order.tax_breakdown.oneOf.0.items.[INDEX].jurisName","typeLabel":"string"},"taxName":{"type":"string","example":"Standard Rate","uniqueKey":"order.tax_breakdown.oneOf.0.items.[INDEX].taxName","typeLabel":"string"},"rate":{"type":"number","format":"float","example":0.2,"uniqueKey":"order.tax_breakdown.oneOf.0.items.[INDEX].rate","typeLabel":"number\u003cfloat>"},"taxable":{"type":"number","format":"float","example":100,"uniqueKey":"order.tax_breakdown.oneOf.0.items.[INDEX].taxable","typeLabel":"number\u003cfloat>"},"tax":{"type":"number","format":"float","example":20,"uniqueKey":"order.tax_breakdown.oneOf.0.items.[INDEX].tax","typeLabel":"number\u003cfloat>"}},"uniqueKey":"order.tax_breakdown.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"order.tax_breakdown.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per-jurisdiction tax detail when tax was calculated automatically for the shipping destination (one entry per taxing jurisdiction). Null when a flat store rate was used.","items":{"type":"object","properties":{"country":{"type":"string","example":"GB"},"region":{"type":"string","example":"GB"},"jurisName":{"type":"string","example":"UNITED KINGDOM"},"taxName":{"type":"string","example":"Standard Rate"},"rate":{"type":"number","format":"float","example":0.2},"taxable":{"type":"number","format":"float","example":100},"tax":{"type":"number","format":"float","example":20}}},"uniqueKey":"order.tax_breakdown.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.tax_breakdown","typeLabel":"object[] | null"},"tax_source":{"oneOf":[{"type":"string","enum":["automatic","fallback","manual",null],"description":"How the tax figure was produced — `automatic` (jurisdiction-accurate calculation for the destination), `fallback` (automatic calculation was unavailable, so the store's configured rate was used), or `manual` (the store's configured rate).","example":"automatic","uniqueKey":"order.tax_source.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["automatic","fallback","manual",null],"description":"How the tax figure was produced — `automatic` (jurisdiction-accurate calculation for the destination), `fallback` (automatic calculation was unavailable, so the store's configured rate was used), or `manual` (the store's configured rate).","example":"automatic","uniqueKey":"order.tax_source.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.tax_source","typeLabel":"enum\u003cstring> | null"},"shipping_amount":{"type":"number","format":"float","example":15,"uniqueKey":"order.shipping_amount","typeLabel":"number\u003cfloat>"},"discount_amount":{"type":"number","format":"float","example":0,"uniqueKey":"order.discount_amount","typeLabel":"number\u003cfloat>"},"total_amount":{"type":"number","format":"float","example":2174.97,"uniqueKey":"order.total_amount","typeLabel":"number\u003cfloat>"},"billing_address":{"type":"object","properties":{"street":{"type":"string","example":"123 Main St","uniqueKey":"order.billing_address.street","typeLabel":"string"},"city":{"type":"string","example":"New York","uniqueKey":"order.billing_address.city","typeLabel":"string"},"state":{"type":"string","example":"NY","uniqueKey":"order.billing_address.state","typeLabel":"string"},"zip":{"type":"string","example":"10001","uniqueKey":"order.billing_address.zip","typeLabel":"string"},"country":{"type":"string","example":"US","uniqueKey":"order.billing_address.country","typeLabel":"string"}},"uniqueKey":"order.billing_address","typeLabel":"object"},"shipping_address":{"oneOf":[{"type":"object","description":"Where the order goes. `null` on an order with `fulfillment_method` `none`, where nothing is shipped.","properties":{"street":{"type":"string","example":"123 Main St","uniqueKey":"order.shipping_address.oneOf.0.street","typeLabel":"string"},"city":{"type":"string","example":"New York","uniqueKey":"order.shipping_address.oneOf.0.city","typeLabel":"string"},"state":{"type":"string","example":"NY","uniqueKey":"order.shipping_address.oneOf.0.state","typeLabel":"string"},"zip":{"type":"string","example":"10001","uniqueKey":"order.shipping_address.oneOf.0.zip","typeLabel":"string"},"country":{"type":"string","example":"US","uniqueKey":"order.shipping_address.oneOf.0.country","typeLabel":"string"},"type":{"type":"string","enum":["pickup"],"description":"Present, as `pickup`, only on a pickup order.","uniqueKey":"order.shipping_address.oneOf.0.type","typeLabel":"enum\u003cstring>"},"name":{"type":"string","example":"Brooklyn store","uniqueKey":"order.shipping_address.oneOf.0.name","typeLabel":"string"},"location_id":{"type":"string","format":"uuid","example":"3d5c7a10-8b2e-4f61-9c4d-1a2b3c4d5e6f","uniqueKey":"order.shipping_address.oneOf.0.location_id","typeLabel":"string\u003cuuid>"},"line1":{"oneOf":[{"type":"string","example":"145 Atlantic Avenue","uniqueKey":"order.shipping_address.oneOf.0.line1.oneOf.0","typeLabel":"string"},{"type":"null","example":"145 Atlantic Avenue","uniqueKey":"order.shipping_address.oneOf.0.line1.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.shipping_address.oneOf.0.line1","typeLabel":"string | null"},"line2":{"oneOf":[{"type":"string","uniqueKey":"order.shipping_address.oneOf.0.line2.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"order.shipping_address.oneOf.0.line2.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.shipping_address.oneOf.0.line2","typeLabel":"string | null"},"postal_code":{"oneOf":[{"type":"string","example":"11201","uniqueKey":"order.shipping_address.oneOf.0.postal_code.oneOf.0","typeLabel":"string"},{"type":"null","example":"11201","uniqueKey":"order.shipping_address.oneOf.0.postal_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.shipping_address.oneOf.0.postal_code","typeLabel":"string | null"}},"uniqueKey":"order.shipping_address.oneOf.0","typeLabel":"object"},{"type":"null","description":"Where the order goes. `null` on an order with `fulfillment_method` `none`, where nothing is shipped.","uniqueKey":"order.shipping_address.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.shipping_address","typeLabel":"object | null"},"fulfillment_method":{"type":"string","enum":["delivery","pickup","none"],"example":"delivery","description":"Whether the order is delivered to the shopper, collected at one of the store's locations, or has nothing to ship (`none`: downloads, codes, event tickets and services only).","uniqueKey":"order.fulfillment_method","typeLabel":"enum\u003cstring>"},"order_type":{"type":"string","enum":["retail","b2b"],"example":"retail","description":"`b2b` for a wholesale order placed by a buyer account, `retail` for every other order. The `order.created`, `order.paid`, `order.fulfilled`, `order.cancelled`, `order.updated` and `order.refunded` events carry the same field.","uniqueKey":"order.order_type","typeLabel":"enum\u003cstring>"},"pickup_location_id":{"oneOf":[{"type":"string","format":"uuid","example":null,"description":"The location the shopper collects from, on a pickup order. Null on a delivery order.","uniqueKey":"order.pickup_location_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","example":null,"description":"The location the shopper collects from, on a pickup order. Null on a delivery order.","uniqueKey":"order.pickup_location_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.pickup_location_id","typeLabel":"string\u003cuuid> | null"},"fulfillment_location_id":{"oneOf":[{"type":"string","format":"uuid","example":"7b2e9c41-0d3f-4a58-b6e1-2f4a6c8e0b13","description":"The store location the order is fulfilled from: the pickup location on a pickup order, or the location deliveries leave from when the store delivers from its nearest location. Null when the store does not route orders between locations.","uniqueKey":"order.fulfillment_location_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","example":"7b2e9c41-0d3f-4a58-b6e1-2f4a6c8e0b13","description":"The store location the order is fulfilled from: the pickup location on a pickup order, or the location deliveries leave from when the store delivers from its nearest location. Null when the store does not route orders between locations.","uniqueKey":"order.fulfillment_location_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.fulfillment_location_id","typeLabel":"string\u003cuuid> | null"},"shipping_option_id":{"oneOf":[{"type":"string","example":"place","description":"The shipping option the order was placed with, as returned by `POST /v1/shipping/calculate` (`place`, `opt:\u003cid>` or `pickup:\u003clocation id>`). Null when none was named.","uniqueKey":"order.shipping_option_id.oneOf.0","typeLabel":"string"},{"type":"null","example":"place","description":"The shipping option the order was placed with, as returned by `POST /v1/shipping/calculate` (`place`, `opt:\u003cid>` or `pickup:\u003clocation id>`). Null when none was named.","uniqueKey":"order.shipping_option_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.shipping_option_id","typeLabel":"string | null"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"order.\\items.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"order_id":{"type":"string","format":"uuid","uniqueKey":"order.\\items.items.[INDEX].order_id","typeLabel":"string\u003cuuid>"},"variant_id":{"oneOf":[{"type":"string","format":"uuid","description":"The variant (SKU) this line sold.","uniqueKey":"order.\\items.items.[INDEX].variant_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","format":"uuid","description":"The variant (SKU) this line sold.","uniqueKey":"order.\\items.items.[INDEX].variant_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.\\items.items.[INDEX].variant_id","typeLabel":"string\u003cuuid> | null"},"sku":{"oneOf":[{"type":"string","description":"The variant's SKU, recorded on the line when the order was placed.","example":"FH-FAS-03-32","uniqueKey":"order.\\items.items.[INDEX].sku.oneOf.0","typeLabel":"string"},{"type":"null","description":"The variant's SKU, recorded on the line when the order was placed.","example":"FH-FAS-03-32","uniqueKey":"order.\\items.items.[INDEX].sku.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.\\items.items.[INDEX].sku","typeLabel":"string | null"},"variant_name":{"oneOf":[{"type":"string","description":"The variant's name, such as `32` or `Large`.","example":"32","uniqueKey":"order.\\items.items.[INDEX].variant_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The variant's name, such as `32` or `Large`.","example":"32","uniqueKey":"order.\\items.items.[INDEX].variant_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.\\items.items.[INDEX].variant_name","typeLabel":"string | null"},"options":{"oneOf":[{"type":"object","additionalProperties":true,"description":"The variant's option values, such as `{ \"Size\": \"32\" }`. `null` for a variant with no options.","example":{"Size":"32"},"uniqueKey":"order.\\items.items.[INDEX].options.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"description":"The variant's option values, such as `{ \"Size\": \"32\" }`. `null` for a variant with no options.","example":{"Size":"32"},"uniqueKey":"order.\\items.items.[INDEX].options.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.\\items.items.[INDEX].options","typeLabel":"object | null"},"product_options":{"oneOf":[{"type":"object","additionalProperties":true,"description":"The variant's option values as recorded on the line when the order was placed.","uniqueKey":"order.\\items.items.[INDEX].product_options.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"description":"The variant's option values as recorded on the line when the order was placed.","uniqueKey":"order.\\items.items.[INDEX].product_options.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.\\items.items.[INDEX].product_options","typeLabel":"object | null"},"custom_fields":{"type":"array","description":"Per-line fields the merchant defined — a personalisation or engraving carried on this line rather than on the order. Only fields the merchant published appear here; the merchant controls the names and how many\nexist, so render the array rather than reading fixed keys.\n","items":{"type":"object","description":"One merchant-defined field and its value on a record. Definitions are authored by the merchant (or by\ntheir platform operator), so the set varies per store and per entity.\n","properties":{"field_name":{"type":"string","description":"The machine name. Stable across edits to the label, so this is the one to key off in code.","example":"buyer_po","uniqueKey":"order.\\items.items.[INDEX].custom_fields.items.[INDEX].field_name","typeLabel":"string"},"field_label":{"type":"string","description":"What the merchant calls this field. The string to display.","example":"Buyer PO number","uniqueKey":"order.\\items.items.[INDEX].custom_fields.items.[INDEX].field_label","typeLabel":"string"},"field_type":{"type":"string","enum":["text","textarea","number","boolean","select","multiselect","date","json","dimensions","weight"],"description":"The shape of `value`: `multiselect` is an array of strings; `json`, `dimensions` and `weight` are\nobjects; the rest are scalars, and a `number` arrives as a number rather than as text.\n","example":"text","uniqueKey":"order.\\items.items.[INDEX].custom_fields.items.[INDEX].field_type","typeLabel":"enum\u003cstring>"},"unit_type":{"oneOf":[{"type":"string","description":"The unit a numeric or measurement field is expressed in, when the merchant set one.","example":null,"uniqueKey":"order.\\items.items.[INDEX].custom_fields.items.[INDEX].unit_type.oneOf.0","typeLabel":"string"},{"type":"null","description":"The unit a numeric or measurement field is expressed in, when the merchant set one.","example":null,"uniqueKey":"order.\\items.items.[INDEX].custom_fields.items.[INDEX].unit_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.\\items.items.[INDEX].custom_fields.items.[INDEX].unit_type","typeLabel":"string | null"},"value":{"description":"The stored value, in the shape implied by `field_type`. Null when the field is defined but has no\nvalue on this record — which is distinct from the field not existing.\n","example":"PO-2026-0819","uniqueKey":"order.\\items.items.[INDEX].custom_fields.items.[INDEX].value","typeLabel":"any"}},"uniqueKey":"order.\\items.items.[INDEX].custom_fields.items.[INDEX]","typeLabel":"object"},"uniqueKey":"order.\\items.items.[INDEX].custom_fields","typeLabel":"object[]"},"product_id":{"type":"string","format":"uuid","description":"Product UUID","uniqueKey":"order.\\items.items.[INDEX].product_id","typeLabel":"string\u003cuuid>"},"product_name":{"type":"string","uniqueKey":"order.\\items.items.[INDEX].product_name","typeLabel":"string"},"product_sku":{"oneOf":[{"type":"string","description":"The variant's SKU. Same value as `sku`.","uniqueKey":"order.\\items.items.[INDEX].product_sku.oneOf.0","typeLabel":"string"},{"type":"null","description":"The variant's SKU. Same value as `sku`.","uniqueKey":"order.\\items.items.[INDEX].product_sku.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.\\items.items.[INDEX].product_sku","typeLabel":"string | null"},"fulfilment_kind":{"type":"string","enum":["shipped","digital","code","event_ticket","service"],"description":"How the line is delivered, as it was when the order was placed. A later change to the product does not change it. Orders placed before delivery kinds existed read as `shipped`.","example":"digital","uniqueKey":"order.\\items.items.[INDEX].fulfilment_kind","typeLabel":"enum\u003cstring>"},"quantity":{"type":"integer","example":2,"uniqueKey":"order.\\items.items.[INDEX].quantity","typeLabel":"integer"},"unit_price":{"type":"number","format":"float","example":999.99,"uniqueKey":"order.\\items.items.[INDEX].unit_price","typeLabel":"number\u003cfloat>"},"total_price":{"type":"number","format":"float","example":1999.98,"description":"`unit_price` × `quantity`, in the order's currency.","uniqueKey":"order.\\items.items.[INDEX].total_price","typeLabel":"number\u003cfloat>"}},"uniqueKey":"order.\\items.items.[INDEX]","typeLabel":"object"},"uniqueKey":"order.\\items","typeLabel":"object[]"},"status_notes":{"type":"array","description":"Customer-visible updates the merchant added as the order moved — the work between payment and\ndispatch (preparation, checks, packing) that a shopper otherwise hears nothing about. Oldest\nfirst, so it reads as a timeline. Internal notes are never included.\n","items":{"type":"object","description":"A customer-visible update on an order. One-way (store to shopper) and tied to the order itself —\ndistinct from a messaging thread, which is a two-way conversation.\n","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"order.status_notes.items.[INDEX].id","typeLabel":"string\u003cuuid>"},"from_status":{"oneOf":[{"type":"string","description":"The status the order moved from, when the note accompanied a transition.","uniqueKey":"order.status_notes.items.[INDEX].from_status.oneOf.0","typeLabel":"string"},{"type":"null","description":"The status the order moved from, when the note accompanied a transition.","uniqueKey":"order.status_notes.items.[INDEX].from_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.status_notes.items.[INDEX].from_status","typeLabel":"string | null"},"to_status":{"oneOf":[{"type":"string","description":"The status the order moved to, when the note accompanied a transition.","uniqueKey":"order.status_notes.items.[INDEX].to_status.oneOf.0","typeLabel":"string"},{"type":"null","description":"The status the order moved to, when the note accompanied a transition.","uniqueKey":"order.status_notes.items.[INDEX].to_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.status_notes.items.[INDEX].to_status","typeLabel":"string | null"},"body":{"type":"string","description":"The message shown to the shopper.","uniqueKey":"order.status_notes.items.[INDEX].body","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"order.status_notes.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"order.status_notes.items.[INDEX]","typeLabel":"object"},"uniqueKey":"order.status_notes","typeLabel":"object[]"},"custom_fields":{"type":"array","description":"The merchant's own fields on this order, with their values — a buyer's purchase-order number, a\ncost centre, whatever the merchant defined. Only fields the merchant published appear here; one\nholding an internal note or a cost stays in the admin. Empty when the merchant has defined none.\n\nThe merchant controls the names and how many exist, so render the array rather than reading fixed\nkeys: `field_label` is the heading to show, and `field_type` gives the shape of `value`.\n","items":{"type":"object","description":"One merchant-defined field and its value on a record. Definitions are authored by the merchant (or by\ntheir platform operator), so the set varies per store and per entity.\n","properties":{"field_name":{"type":"string","description":"The machine name. Stable across edits to the label, so this is the one to key off in code.","example":"buyer_po","uniqueKey":"order.custom_fields.items.[INDEX].field_name","typeLabel":"string"},"field_label":{"type":"string","description":"What the merchant calls this field. The string to display.","example":"Buyer PO number","uniqueKey":"order.custom_fields.items.[INDEX].field_label","typeLabel":"string"},"field_type":{"type":"string","enum":["text","textarea","number","boolean","select","multiselect","date","json","dimensions","weight"],"description":"The shape of `value`: `multiselect` is an array of strings; `json`, `dimensions` and `weight` are\nobjects; the rest are scalars, and a `number` arrives as a number rather than as text.\n","example":"text","uniqueKey":"order.custom_fields.items.[INDEX].field_type","typeLabel":"enum\u003cstring>"},"unit_type":{"oneOf":[{"type":"string","description":"The unit a numeric or measurement field is expressed in, when the merchant set one.","example":null,"uniqueKey":"order.custom_fields.items.[INDEX].unit_type.oneOf.0","typeLabel":"string"},{"type":"null","description":"The unit a numeric or measurement field is expressed in, when the merchant set one.","example":null,"uniqueKey":"order.custom_fields.items.[INDEX].unit_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.custom_fields.items.[INDEX].unit_type","typeLabel":"string | null"},"value":{"description":"The stored value, in the shape implied by `field_type`. Null when the field is defined but has no\nvalue on this record — which is distinct from the field not existing.\n","example":"PO-2026-0819","uniqueKey":"order.custom_fields.items.[INDEX].value","typeLabel":"any"}},"uniqueKey":"order.custom_fields.items.[INDEX]","typeLabel":"object"},"uniqueKey":"order.custom_fields","typeLabel":"object[]"},"notes":{"type":"string","uniqueKey":"order.notes","typeLabel":"string"},"tracking_number":{"type":"string","uniqueKey":"order.tracking_number","typeLabel":"string"},"estimated_delivery":{"type":"string","format":"date-time","uniqueKey":"order.estimated_delivery","typeLabel":"string\u003cdate-time>"},"shipped_at":{"type":"string","format":"date-time","uniqueKey":"order.shipped_at","typeLabel":"string\u003cdate-time>"},"delivered_at":{"type":"string","format":"date-time","uniqueKey":"order.delivered_at","typeLabel":"string\u003cdate-time>"},"created_at":{"type":"string","format":"date-time","uniqueKey":"order.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","uniqueKey":"order.updated_at","typeLabel":"string\u003cdate-time>"},"environment":{"type":"string","enum":["production","sandbox"],"description":"Whether this order was created in the live or test environment. Sandbox orders are isolated from production data.","example":"production","uniqueKey":"order.environment","typeLabel":"enum\u003cstring>"},"shipping_metadata":{"oneOf":[{"type":"object","description":"How the shipping charge was arrived at. `shipping_source` and `shipping_rule` are recorded by the server when the order is created; the other fields are the details the storefront sent with the order.","properties":{"shipping_source":{"type":"string","enum":["shippo","custom","zone_tier","fallback","pickup","not_configured","unverified"],"example":"zone_tier","description":"What `shipping_amount` was checked against:\n- shippo: a carrier option from the store's connected carrier account\n- custom: a carrier option from the store's custom shipping extension\n- zone_tier: the store's delivery zone or distance rate for the address\n- fallback: the store's \"everywhere else\" rate\n- pickup: the pickup fee of the collection location\n- not_configured: the store has no delivery rates and the order carries no shipping charge\n- unverified: the amount could not be checked (the store has no delivery rates but a charge\n was sent, or the destination could not be located); the order was accepted as sent","uniqueKey":"order.shipping_metadata.oneOf.0.shipping_source","typeLabel":"enum\u003cstring>"},"shipping_rule":{"type":"string","enum":["zone","distance","fallback","none","pickup"],"example":"distance","description":"The rule that priced the order, when it was priced from the store's own rates or a pickup location. Absent for carrier options and unchecked amounts.","uniqueKey":"order.shipping_metadata.oneOf.0.shipping_rule","typeLabel":"enum\u003cstring>"},"fee":{"type":"number","format":"float","description":"Calculated shipping fee","example":100,"uniqueKey":"order.shipping_metadata.oneOf.0.fee","typeLabel":"number\u003cfloat>"},"zone_name":{"oneOf":[{"type":"string","description":"Delivery zone name (if zone-based pricing)","example":"CBD Zone","uniqueKey":"order.shipping_metadata.oneOf.0.zone_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Delivery zone name (if zone-based pricing)","example":"CBD Zone","uniqueKey":"order.shipping_metadata.oneOf.0.zone_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.shipping_metadata.oneOf.0.zone_name","typeLabel":"string | null"},"tier_name":{"oneOf":[{"type":"string","description":"Pricing tier name (if distance-based pricing)","example":"Within Manhattan","uniqueKey":"order.shipping_metadata.oneOf.0.tier_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Pricing tier name (if distance-based pricing)","example":"Within Manhattan","uniqueKey":"order.shipping_metadata.oneOf.0.tier_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.shipping_metadata.oneOf.0.tier_name","typeLabel":"string | null"},"distance_meters":{"oneOf":[{"type":"number","format":"float","description":"Calculated distance from store (if distance-based)","example":19.23,"uniqueKey":"order.shipping_metadata.oneOf.0.distance_meters.oneOf.0","typeLabel":"number\u003cfloat>"},{"type":"null","format":"float","description":"Calculated distance from store (if distance-based)","example":19.23,"uniqueKey":"order.shipping_metadata.oneOf.0.distance_meters.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.shipping_metadata.oneOf.0.distance_meters","typeLabel":"number\u003cfloat> | null"},"is_free":{"type":"boolean","description":"Whether free delivery was applied","example":false,"uniqueKey":"order.shipping_metadata.oneOf.0.is_free","typeLabel":"boolean"},"reason":{"type":"string","description":"Human-readable explanation of fee","example":"19 m away","uniqueKey":"order.shipping_metadata.oneOf.0.reason","typeLabel":"string"},"applied_rule":{"type":"string","enum":["zone","distance","fallback","none"],"description":"Which of the store's rates priced the address, as returned by `POST /v1/shipping/calculate`.","example":"distance","uniqueKey":"order.shipping_metadata.oneOf.0.applied_rule","typeLabel":"enum\u003cstring>"}},"uniqueKey":"order.shipping_metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"How the shipping charge was arrived at. `shipping_source` and `shipping_rule` are recorded by the server when the order is created; the other fields are the details the storefront sent with the order.","properties":{"shipping_source":{"type":"string","enum":["shippo","custom","zone_tier","fallback","pickup","not_configured","unverified"],"example":"zone_tier","description":"What `shipping_amount` was checked against:\n- shippo: a carrier option from the store's connected carrier account\n- custom: a carrier option from the store's custom shipping extension\n- zone_tier: the store's delivery zone or distance rate for the address\n- fallback: the store's \"everywhere else\" rate\n- pickup: the pickup fee of the collection location\n- not_configured: the store has no delivery rates and the order carries no shipping charge\n- unverified: the amount could not be checked (the store has no delivery rates but a charge\n was sent, or the destination could not be located); the order was accepted as sent"},"shipping_rule":{"type":"string","enum":["zone","distance","fallback","none","pickup"],"example":"distance","description":"The rule that priced the order, when it was priced from the store's own rates or a pickup location. Absent for carrier options and unchecked amounts."},"fee":{"type":"number","format":"float","description":"Calculated shipping fee","example":100},"zone_name":{"oneOf":[{"type":"string","description":"Delivery zone name (if zone-based pricing)","example":"CBD Zone"},{"type":"null","description":"Delivery zone name (if zone-based pricing)","example":"CBD Zone"}]},"tier_name":{"oneOf":[{"type":"string","description":"Pricing tier name (if distance-based pricing)","example":"Within Manhattan"},{"type":"null","description":"Pricing tier name (if distance-based pricing)","example":"Within Manhattan"}]},"distance_meters":{"oneOf":[{"type":"number","format":"float","description":"Calculated distance from store (if distance-based)","example":19.23},{"type":"null","format":"float","description":"Calculated distance from store (if distance-based)","example":19.23}]},"is_free":{"type":"boolean","description":"Whether free delivery was applied","example":false},"reason":{"type":"string","description":"Human-readable explanation of fee","example":"19 m away"},"applied_rule":{"type":"string","enum":["zone","distance","fallback","none"],"description":"Which of the store's rates priced the address, as returned by `POST /v1/shipping/calculate`.","example":"distance"}},"uniqueKey":"order.shipping_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"order.shipping_metadata","typeLabel":"object | null"}},"isRequired":true,"uniqueKey":"order","typeLabel":"object"},"claim_token":{"type":"string","description":"Present only on the response that creates a guest order whose customer record this order\ncreated. A one-time credential for `POST /v1/auth/claim-account`, which lets the guest set a\npassword on the order confirmation and own the order in a new account. It is returned\nonce, is not returned when a create is replayed with the same `Idempotency-Key`, and\nexpires at `claim_token_expires_at`. Treat it as a secret: keep it on the confirmation page\nand send it nowhere else.\n","example":"gcclaim_Zm9vYmFyYmF6cXV4MTIzNDU2Nzg5MGFiY2RlZmdoaWo","uniqueKey":"claim_token","typeLabel":"string"},"claim_token_expires_at":{"type":"string","format":"date-time","description":"When `claim_token` stops working. Present with it.","uniqueKey":"claim_token_expires_at","typeLabel":"string\u003cdate-time>"},"store_credit_applied":{"type":"number","format":"float","description":"Present only when store credit was applied to this order. The\namount of the customer's store credit spent against the order.\n","example":25,"uniqueKey":"store_credit_applied","typeLabel":"number\u003cfloat>"},"post_processing_warnings":{"type":"array","description":"Optional. Present only when one or more post-order processing\nsteps (gift card redemption, stock reduction, etc.) failed.\nThe order itself was created successfully, but a downstream\nside effect needs human follow-up. Each warning indicates the\nstage that failed and a human-readable message.\n","items":{"type":"object","required":["stage","message"],"properties":{"stage":{"type":"string","description":"The post-processing stage that emitted the warning","example":"gift_card_redemption","isRequired":true,"uniqueKey":"post_processing_warnings.items.[INDEX].stage","typeLabel":"string"},"message":{"type":"string","description":"Human-readable description of the failure","example":"Gift card redemption failed: Gift card not found for this store. The order was created but no gift card credit was applied. Please contact support.","isRequired":true,"uniqueKey":"post_processing_warnings.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"post_processing_warnings.items.[INDEX]","typeLabel":"object"},"uniqueKey":"post_processing_warnings","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"order":{"id":"922d235e-48c9-4933-abcd-88cb2a264f86","order_number":"ORD-1771523999910","customer_id":"c320094c-eb65-4879-804c-83d2e1dd7f99","customer_email":"john.doe@example.com","customer_name":"John Doe","order_status":"pending","payment_status":"pending","total_amount":2520,"fulfillment_method":"delivery","pickup_location_id":null,"fulfillment_location_id":null,"shipping_option_id":"place","items":[{"product_id":"715b8c10-eb11-4289-8c0e-2966e78cf9a5","product_name":"Apple MacBook Pro","quantity":2,"unit_price":1000,"total_price":2000}],"created_at":"2026-02-19T10:30:00Z"}},"examples":{"Example":{"title":"Example","value":{"order":{"id":"922d235e-48c9-4933-abcd-88cb2a264f86","order_number":"ORD-1771523999910","customer_id":"c320094c-eb65-4879-804c-83d2e1dd7f99","customer_email":"john.doe@example.com","customer_name":"John Doe","order_status":"pending","payment_status":"pending","total_amount":2520,"fulfillment_method":"delivery","pickup_location_id":null,"fulfillment_location_id":null,"shipping_option_id":"place","items":[{"product_id":"715b8c10-eb11-4289-8c0e-2966e78cf9a5","product_name":"Apple MacBook Pro","quantity":2,"unit_price":1000,"total_price":2000}],"created_at":"2026-02-19T10:30:00Z"}}}},"exampleType":"examples"}},"exampleType":"examples"},"c21bf981-c055-4ba7-afca-aa29bd06d797":{"description":"Accepted for processing under load — the order was **not** created synchronously; it will be\ncreated a moment later and is guaranteed to use the `Idempotency-Key` you sent. The response\nbody does **not** contain the order.\n\nThis happens only on deployments where deferred order writes are enabled (marketplace\ndeployments enable it by default; others opt in), and only when the deployment is under a\nsustained order surge. Below that load, and on deployments without it enabled, order creation\nis synchronous and returns `201`. Deferral protects everyone from an order spike by turning it\ninto a brief delay for the order that caused it, rather than errors for all.\n\n**How to handle it:** treat `202` as success-in-progress, not failure. Retrieve the order by\nreplaying `POST /v1/orders` with the same `Idempotency-Key` (it returns `200` with the order\nonce created), or poll `GET /v1/orders/{id}` if you obtain the id another way. A client that\nonly understands `201` and does not poll should not enable this feature.\n","content":{"application/json":{"schema":{"type":"object","required":["status","idempotency_key"],"properties":{"status":{"type":"string","enum":["accepted"],"description":"Always `accepted` — the order is queued, not yet created.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"idempotency_key":{"type":"string","description":"The key this order will be created under. Replay the create with this key to fetch\nthe order once it exists.\n","isRequired":true,"uniqueKey":"idempotency_key","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"status":"accepted","message":"Order accepted and queued for processing under current load; it will be created shortly. Poll by Idempotency-Key.","idempotency_key":"order-20260823-a1b2c3"},"examples":{"Example":{"title":"Example","value":{"status":"accepted","message":"Order accepted and queued for processing under current load; it will be created shortly. Poll by Idempotency-Key.","idempotency_key":"order-20260823-a1b2c3"}}},"exampleType":"examples"}},"exampleType":"examples"},"4b645e06-91ce-43b3-81db-75da379b34c7":{"description":"Invalid request (missing required fields, invalid data)","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"missing_total_or_payment_method":{"title":"missing_total_or_payment_method","summary":"Missing required total_amount or payment_method","value":{"error":{"code":"invalid_request","message":"total_amount and payment_method are required"}}},"missing_items":{"title":"missing_items","summary":"Empty or missing items array","value":{"error":{"code":"invalid_request","message":"At least one order item is required"}}},"missing_item_ref":{"title":"missing_item_ref","summary":"Item missing both variant_id and product_id","value":{"error":{"code":"invalid_request","message":"Each order item must include variant_id or product_id"}}},"tax_exclusive_missing_breakdown":{"title":"tax_exclusive_missing_breakdown","summary":"Store uses tax-exclusive pricing without subtotal/tax_amount","value":{"error":{"code":"invalid_request","message":"Store uses tax-exclusive pricing. Please provide both subtotal and tax_amount."}}},"fulfillment_method_invalid":{"title":"fulfillment_method_invalid","summary":"fulfillment_method is none but the order has an item that ships","value":{"error":{"code":"fulfillment_method_invalid","message":"This order has items that are delivered or collected, so fulfillment_method cannot be 'none'. Use 'delivery' or 'pickup'."}}},"billing_location_required":{"title":"billing_location_required","summary":"An order with nothing to ship has no billing country and postal code","value":{"error":{"code":"billing_location_required","message":"Nothing in this order is shipped, so the billing country and postcode are needed for tax: send billing_address.country_code (two letters) and billing_address.postal_code.","details":{"missing":["postal_code"]}}}},"line_field_required":{"title":"line_field_required","summary":"A required field on an event ticket or code line is empty","value":{"error":{"code":"line_field_required","message":"items[0] needs Attendee name (custom_fields.attendee_name).","details":{"item_index":0,"field_name":"attendee_name","missing":["attendee_name"]}}}},"ticket_limit_exceeded":{"title":"ticket_limit_exceeded","summary":"More units of one event ticket than a single order may carry","value":{"error":{"code":"ticket_limit_exceeded","message":"This order has more event tickets of one type than a single order may carry."}}},"shipping_rate_invalid":{"title":"shipping_rate_invalid","summary":"The chosen carrier option is unknown, expired, foreign or in another currency","value":{"error":{"code":"shipping_rate_invalid","message":"That shipping option is not available for this store. Get fresh shipping options and choose again."}}},"shipping_not_deliverable":{"title":"shipping_not_deliverable","summary":"The store does not deliver to the shipping address","value":{"error":{"code":"shipping_not_deliverable","message":"This store does not deliver to the shipping address."}}},"shipping_option_unavailable":{"title":"shipping_option_unavailable","summary":"The chosen delivery option does not apply to this order","value":{"error":{"code":"shipping_option_unavailable","message":"That shipping option is not available for this order. Get fresh shipping options and choose again."}}},"pickup_unavailable":{"title":"pickup_unavailable","summary":"The store does not offer pickup at the location, or the order is below its minimum","value":{"error":{"code":"pickup_unavailable","message":"This store does not offer pickup at that location."}}},"shipping_mismatch":{"title":"shipping_mismatch","summary":"shipping_amount differs from the store's charge for the address","value":{"error":{"code":"price_mismatch","message":"shipping_amount does not match the delivery charge for this address","details":"expected 5.99, got 0.00"}}},"subscribe_save_not_applicable":{"title":"subscribe_save_not_applicable","summary":"The Subscribe \u0026 Save offer is not live, or covers none of the order's items","value":{"error":{"code":"subscribe_save_not_applicable","message":"This Subscribe \u0026 Save offer is not available for the items in this order."}}},"subscribe_save_interval":{"title":"subscribe_save_interval","summary":"The interval is not one the offer lists","value":{"error":{"code":"invalid_request","message":"Choose one of the delivery intervals this offer allows."}}},"subscribe_save_free_shipping":{"title":"subscribe_save_free_shipping","summary":"The offer includes free shipping but shipping_amount is not 0","value":{"error":{"code":"price_mismatch","message":"shipping_amount must be 0 for an order with free Subscribe \u0026 Save shipping","details":"expected 0.00, got 5.99"}}}},"exampleType":"examples"}},"exampleType":"examples"},"95e7a664-aea0-4d30-b567-ee4a7b4e5408":{"description":"Authentication failed. Either the API key is missing, invalid or expired (`unauthorized`), or the request signature failed verification (`signature_missing`, `timestamp_missing`, `timestamp_malformed`, `timestamp_out_of_window`, `signature_invalid`). `X-Timestamp` is Unix time in seconds or milliseconds, within 5 minutes of server time.","headers":{"Tybrite-Environment":{"description":"Confirms which environment your API key resolved to. Use this to verify that test keys\nare hitting sandbox data and live keys are hitting production data.\n\n- `production` — requests are scoped to live data; real orders, customers, and payments\n- `sandbox` — requests are scoped to isolated test data; no real money is moved\n\nPresent on every authenticated response, including error responses.\n","schema":{"type":"string","enum":["production","sandbox"]},"example":"sandbox"}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"invalid_api_key":{"title":"invalid_api_key","summary":"Invalid or expired API key","value":{"error":{"code":"unauthorized","message":"Invalid or expired API key"}}},"missing_api_key":{"title":"missing_api_key","summary":"Missing API key","value":{"error":{"code":"unauthorized","message":"Missing or invalid Authorization header"}}},"expired_api_key":{"title":"expired_api_key","summary":"API key past its expiry","value":{"error":{"code":"unauthorized","message":"API key has expired"}}},"signature_missing":{"title":"signature_missing","summary":"Missing X-Signature header","value":{"error":{"code":"signature_missing","message":"Missing X-Signature header. Sign the request as base64(HMAC-SHA256(\"{timestamp}.{body}\"))."}}},"timestamp_missing":{"title":"timestamp_missing","summary":"Missing X-Timestamp header","value":{"error":{"code":"timestamp_missing","message":"Missing X-Timestamp header. Send the Unix time in seconds or milliseconds."}}},"timestamp_malformed":{"title":"timestamp_malformed","summary":"X-Timestamp is not a number","value":{"error":{"code":"timestamp_malformed","message":"X-Timestamp must be a Unix timestamp in seconds or milliseconds."}}},"timestamp_out_of_window":{"title":"timestamp_out_of_window","summary":"X-Timestamp more than 5 minutes from server time","value":{"error":{"code":"timestamp_out_of_window","message":"X-Timestamp is outside the accepted window. Check the sending clock and re-sign.","details":"The timestamp was 412s away from server time."}}},"signature_invalid":{"title":"signature_invalid","summary":"Signature does not match","value":{"error":{"code":"signature_invalid","message":"Signature does not match. Sign the exact bytes sent as \"{timestamp}.{body}\", using the same timestamp as the X-Timestamp header, and encode the digest as base64."}}}},"exampleType":"examples"}},"exampleType":"examples"},"0c7bebb3-de02-49b2-a0b6-f674c2b87607":{"description":"The store's subscription is not active, or the store is deactivated. Every API-keyed request for that store answers `402` with `subscription_expired` until the subscription is renewed.","headers":{"Tybrite-Environment":{"description":"Confirms which environment your API key resolved to. Use this to verify that test keys\nare hitting sandbox data and live keys are hitting production data.\n\n- `production` — requests are scoped to live data; real orders, customers, and payments\n- `sandbox` — requests are scoped to isolated test data; no real money is moved\n\nPresent on every authenticated response, including error responses.\n","schema":{"type":"string","enum":["production","sandbox"]},"example":"sandbox"}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"subscription_expired","message":"This store's subscription is not active"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"subscription_expired","message":"This store's subscription is not active"}}}},"exampleType":"examples"}},"exampleType":"examples"},"9975255a-4de7-4a3e-b999-87fc7a6da417":{"description":"Insufficient permissions for this key. A GC Connect key that was not granted the operation's scope (for example `agent:read` or `orders:write`) receives `insufficient_scope`, and the message names the scope. A request that needs a secret key (a publishable key on a write, whatever scopes it holds), or a marketplace operator key calling a single-store operation, receives `forbidden`. A store whose plan does not include the feature the route belongs to receives `feature_not_available`, whatever the key. A publishable key limited to the products that carry one tag receives `out_of_scope` for a product, variant, promotion or review outside its slice, and `endpoint_not_allowed` on a route that has no slice behaviour. A request that identifies a customer (`x-auth-token`, `x-external-auth` or `x-idp-token`) whose account has been closed receives `account_closed`.","headers":{"Tybrite-Environment":{"description":"Confirms which environment your API key resolved to. Use this to verify that test keys\nare hitting sandbox data and live keys are hitting production data.\n\n- `production` — requests are scoped to live data; real orders, customers, and payments\n- `sandbox` — requests are scoped to isolated test data; no real money is moved\n\nPresent on every authenticated response, including error responses.\n","schema":{"type":"string","enum":["production","sandbox"]},"example":"sandbox"}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"insufficient_scope":{"title":"insufficient_scope","summary":"Connect key without the operation's scope","value":{"error":{"code":"insufficient_scope","message":"This connected app was not granted the 'agent:read' scope."}}},"forbidden":{"title":"forbidden","summary":"Secret key required","value":{"error":{"code":"forbidden","message":"This operation requires a secret key. Publishable keys cover catalogue reads and the actions a shopper takes for themselves."}}},"feature_not_available":{"title":"feature_not_available","summary":"The store's plan does not include the feature","value":{"error":{"code":"feature_not_available","message":"Smart Search is not available for this store."}}},"out_of_scope":{"title":"out_of_scope","summary":"A publishable key limited to one tag named a product outside its slice","value":{"error":{"code":"out_of_scope","message":"This key is limited to part of the catalogue and this product is outside it."}}},"account_closed":{"title":"account_closed","summary":"The identified customer account has been closed","value":{"error":{"code":"account_closed","message":"This customer account has been closed."}}}},"exampleType":"examples"}},"exampleType":"examples"},"b4bf1a22-50f1-4e1e-a810-1e02126fb7fc":{"description":"Resource not found","headers":{"Tybrite-Environment":{"description":"Confirms which environment your API key resolved to. Use this to verify that test keys\nare hitting sandbox data and live keys are hitting production data.\n\n- `production` — requests are scoped to live data; real orders, customers, and payments\n- `sandbox` — requests are scoped to isolated test data; no real money is moved\n\nPresent on every authenticated response, including error responses.\n","schema":{"type":"string","enum":["production","sandbox"]},"example":"sandbox"}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"not_found","message":"Resource not found"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"not_found","message":"Resource not found"}}}},"exampleType":"examples"}},"exampleType":"examples"},"c852b328-14d4-48f9-909e-7dbc27fdd423":{"description":"The `Idempotency-Key` was already used with a different request body (`idempotency_key_reused`), or the request conflicts with an existing order number (`conflict`). Send a new key for a different request.\nCreating an order as already paid also checks the payment: the verified payment belongs to another order, is in another currency, or its `payment_reference` is already attached to another order of the store (`payment_order_mismatch`, `payment_currency_mismatch`, `payment_reference_in_use`). No order is created. The payment method must also be in the mode of the key's environment: a live order is never marked paid by a payment made on test credentials (`provider_not_live`), and a sandbox order is never checked against live credentials (`provider_not_test_mode`).\nA `subscribe_save` order without a `customer_id` is refused with `account_required`: a subscription needs a signed-in shopper, so have the shopper sign in or create an account and send their `customer_id`. A free order (`total_amount` 0) without a signed-in shopper is refused the same way.\nAn event ticket that cannot be bought is refused with `ticket_sale_closed` (sales not open or closed), `ticket_event_ended`, or `insufficient_stock` (the ticket type is sold out or the venue is full); `not_available` marks an item the store can no longer sell. A gift card that has less available than the order needs, because another checkout is using it, is refused with `gift_card_unavailable`; the card is held for an order until it is paid or closed unpaid. A campaign whose budget no longer covers the order's discount, because other open orders have reserved it, is refused with `campaign_budget_exhausted`; re-price the cart and send the order again.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"idempotency_key_reused":{"title":"idempotency_key_reused","summary":"Idempotency-Key reused with a different request","value":{"error":{"code":"idempotency_key_reused","message":"This Idempotency-Key was already used with a different request. Send a new key for a different request."}}},"payment_reference_in_use":{"title":"payment_reference_in_use","summary":"The payment reference is already attached to another order","value":{"error":{"code":"payment_reference_in_use","message":"This payment reference is already attached to another order"}}},"provider_not_live":{"title":"provider_not_live","summary":"A live order paid on test credentials","value":{"error":{"code":"provider_not_live","message":"stripe is connected with test credentials, so a payment made through it cannot mark a live order paid.","details":{"provider":"stripe","configured_environment":"test"}}}},"account_required":{"title":"account_required","summary":"Subscribe \u0026 Save needs a signed-in shopper","value":{"error":{"code":"account_required","message":"Subscribe \u0026 Save needs a signed-in shopper account. Have the shopper sign in or create an account, then place the order with their customer_id."}}},"free_order_account_required":{"title":"free_order_account_required","summary":"A free order needs a signed-in shopper","value":{"error":{"code":"account_required","message":"A free order needs a signed-in shopper. Have the shopper sign in or create an account, then place the order with their session or customer_id."}}},"ticket_sale_closed":{"title":"ticket_sale_closed","summary":"Sales of the event ticket have not opened or have closed","value":{"error":{"code":"ticket_sale_closed","message":"Event tickets of this type are not on sale right now."}}},"ticket_event_ended":{"title":"ticket_event_ended","summary":"The event has ended","value":{"error":{"code":"ticket_event_ended","message":"This event has already ended, so event tickets for it can no longer be bought."}}},"insufficient_stock":{"title":"insufficient_stock","summary":"Not enough of an item, or the event is full","value":{"error":{"code":"insufficient_stock","message":"There are not enough of this item left to complete the order."}}},"not_available":{"title":"not_available","summary":"The item can no longer be sold by the store","value":{"error":{"code":"not_available","message":"This item is no longer available."}}},"gift_card_unavailable":{"title":"gift_card_unavailable","summary":"The gift card is in use by another checkout","value":{"error":{"code":"gift_card_unavailable","message":"This gift card has less available than the order needs because another checkout is using it. Try again in a moment."}}},"campaign_budget_exhausted":{"title":"campaign_budget_exhausted","summary":"A campaign's budget no longer covers the order's discount","value":{"error":{"code":"campaign_budget_exhausted","message":"An offer on this order has just run out. Refresh the cart to see the current price and try again."}}}},"exampleType":"examples"}},"exampleType":"examples"},"aa26e63e-0aac-401a-9d5f-f628cf531e0e":{"description":"The store runs its own order-validation rule and that rule rejected the order (`order_rejected`). The `message` carries the reason the store gave. No order is created. This is also returned when the store requires validation but the rule could not be reached, so an order is never created unchecked.\nCreating an order as already paid with a `payment_reference` also verifies the payment with the provider: a reference the provider does not report as paid is refused (`payment_not_verified`), and so is a verified payment that does not cover the order total (`amount_mismatch`).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"order_rejected":{"title":"order_rejected","summary":"The store's validation rule rejected the order","value":{"error":{"code":"order_rejected","message":"Order rejected by store validation rule"}}},"payment_not_verified":{"title":"payment_not_verified","summary":"The provider does not report the reference as paid","value":{"error":{"code":"payment_not_verified","message":"The payment provider does not report this reference as paid"}}}},"exampleType":"examples"}},"exampleType":"examples"},"acef1fd5-419f-4285-81ac-85e1a47d9e69":{"description":"Too many requests. Three distinct `429` codes: `rate_limited` (an abuse throttle — too many requests too fast; carries an `X-RateLimit-Scope: abuse` header and is NOT counted against your monthly quota), `guest_limit_reached` (the same per-address throttle, answered to a guest, a request with no shopper credential, whose per-address hourly budget at this store is lower than a signed-in shopper's) and `quota_exceeded` (your plan's monthly request allowance is reached).\n`guest_limit_reached` carries `details`: `scope` is `guest`, `bucket` is `browse`, `limit` is the guest budget, `window_seconds` is `3600`, `remaining` is `0`, `reset` and `retry_after` say when the hour ends, `signed_in_limit` is the signed-in shopper's budget and `sign_in_raises_limit` is `true`. A storefront shows its sign-in prompt for this code. A signed-in shopper, and a guest whose budget is not lower than the signed-in one, get `rate_limited`.\nOn a throttle refusal (`rate_limited`, `guest_limit_reached`) `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` describe the window that refused the request (the hour, the day or the per-address hour) and `Retry-After` is the time until it ends. On `quota_exceeded` they describe the monthly allowance.","headers":{"Tybrite-Environment":{"description":"Confirms which environment your API key resolved to. Use this to verify that test keys\nare hitting sandbox data and live keys are hitting production data.\n\n- `production` — requests are scoped to live data; real orders, customers, and payments\n- `sandbox` — requests are scoped to isolated test data; no real money is moved\n\nPresent on every authenticated response, including error responses.\n","schema":{"type":"string","enum":["production","sandbox"]},"example":"sandbox"},"Retry-After":{"description":"Seconds until the limit that refused the request resets. Sent with `rate_limited`, `guest_limit_reached` and `quota_exceeded` (for the latter, the seconds until the monthly reset). Not sent when no reset time is known.","schema":{"type":"integer"},"example":540}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"rate_limited":{"title":"rate_limited","summary":"An abuse throttle","value":{"error":{"code":"rate_limited","message":"Too many requests for this API key. Please slow down and try again shortly.","remaining":0,"reset":1706198400}}},"guest_limit_reached":{"title":"guest_limit_reached","summary":"A guest reached a per-address budget that signing in raises","value":{"error":{"code":"guest_limit_reached","message":"Sign in to keep going — signed-in shoppers get more.","details":{"scope":"guest","bucket":"browse","limit":500,"window_seconds":3600,"remaining":0,"reset":1706198400,"retry_after":540,"signed_in_limit":2000,"sign_in_raises_limit":true}}}}},"exampleType":"examples"}},"exampleType":"examples"},"f6389ac7-75e4-4bbd-a502-52a23fa5f1bc":{"description":"Internal error, or `config_error` when the store has no HMAC secret configured (\"Store HMAC secret not configured. Contact support.\").","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"config_error","message":"Store HMAC secret not configured. Contact support."}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"config_error","message":"Store HMAC secret not configured. Contact support."}}}},"exampleType":"examples"}},"exampleType":"examples"},"487929e4-a828-4f0a-87e0-8dcb5de627d3":{"description":"Shipping could not be checked right now (`shipping_unavailable`). No order is created.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"shipping_unavailable","message":"Shipping could not be checked right now. Please try again."}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"shipping_unavailable","message":"Shipping could not be checked right now. Please try again."}}}},"exampleType":"examples"}},"exampleType":"examples"},"ba63dd36-2e2b-4c58-8c54-ab0431e0db5c":{"description":"Creating the order as already paid needs the payment verified, and the payment could not be verified at this moment (`verification_unavailable`). No order is created; retry shortly with the same `Idempotency-Key`.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_request","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing required field","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"oneOf":[{"type":"string","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","uniqueKey":"error.details.oneOf.0","typeLabel":"string"},{"type":"object","description":"Further detail about the error: a sentence, or for some errors an object (for example the `missing` list of `billing_location_required` or the `item_index` and `field_name` of `line_field_required`).","example":"The 'email' field is required","additionalProperties":true,"uniqueKey":"error.details.oneOf.1","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"string | object"},"hint":{"type":"string","description":"Additional guidance on how to resolve the error.","uniqueKey":"error.hint","typeLabel":"string"},"available_stock":{"type":"integer","description":"Current stock level (present on insufficient_stock errors).","uniqueKey":"error.available_stock","typeLabel":"integer"},"current_cart_quantity":{"type":"integer","description":"Quantity already in cart (present on insufficient_stock errors).","uniqueKey":"error.current_cart_quantity","typeLabel":"integer"},"limit":{"type":"integer","description":"Rate limit ceiling (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.limit","typeLabel":"integer"},"remaining":{"type":"integer","description":"Requests remaining in the current window (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.remaining","typeLabel":"integer"},"reset":{"type":"integer","description":"Unix timestamp when the rate limit / quota window resets (present on rate_limited / quota_exceeded errors).","uniqueKey":"error.reset","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"verification_unavailable","message":"Could not verify the payment with the provider. Try again."}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"verification_unavailable","message":"Could not verify the payment with the provider. Try again."}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"fef959fc-83ac-48b9-bdfb-6fc22d417e96":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"**API Key Authentication**\n \nUse your API key in the Authorization header:\n```\nAuthorization: Bearer tybrite_sk_live_YOUR_KEY\n```\n \n**Key Types:**\n \n**Secret Keys (Server-Side Only):**\n- Format: `tybrite_sk_live_*` (production) or `tybrite_sk_test_*` (sandbox)\n- Full read/write access to all endpoints\n- ⚠️ NEVER expose in client-side code or public repositories\n- Required for: every write a shopper does not make for themselves, authentication, payment verification, AI recommendations\n \n**Publishable Keys (Client-Safe):**\n- Format: `tybrite_pk_live_*` (production) or `tybrite_pk_test_*` (sandbox)\n- Catalogue reads, plus the actions a shopper takes for themselves\n- ✅ Safe for client-side JavaScript, mobile apps, and public code\n- Allowed for: browsing products, search, CMS content, pricing queries, cart and wishlist,\n reviews, storefront events, and the Agent API's quotes, cart drafts and checkout intents\n \n**Endpoint-Specific Requirements:**\n- **Authentication endpoints** (`/v1/auth/*`): state-changing `POST` calls require a secret key, for store and marketplace keys alike; `GET /v1/auth/me` accepts either key\n- **Payment verification** (`POST /v1/payments/verify`): Secret key required\n- **AI Recommendations** (`POST /v1/recommendations`): Secret key required\n- **Semantic Search** (`POST /v1/search`): Both key types allowed (read-only operation)\n- **Shopper actions** (cart, wishlist, reviews, storefront events, Agent API quotes, cart drafts and checkout intents): Both key types allowed\n- **All other write operations**: Secret key required\n- **All read operations**: Both key types allowed\n \nUsing a publishable key for restricted operations returns 403 Forbidden.\n\n**Limited publishable keys:**\nA publishable key can be limited to the products that carry one tag (for example `starter:jewellery`), created from\nthe store's Developers page. The limit applies to the key, never to the shopper: shopper sign-up and sign-in stay store-wide.\n- Reads return only the slice: products (with their facets, filters, search, brands and specifications), categories and\n subcategories that hold in-slice products, collections, promotions, posts and lookbooks that carry the tag, reviews of\n in-slice products, prices, discovery lists and the store information summary, with every count computed on the slice.\n A product outside the slice answers `404`, as if it did not exist.\n- A write that names a product or variant outside the slice (adding to the cart or wishlist, reserving stock, an order line,\n a review, a promotion calculation, a storefront event) answers `403` with the error code `out_of_scope`, and nothing is\n written or reserved. An order is refused as a whole.\n- A route that carries no slice behaviour is not available to the key: it answers `403` with `endpoint_not_allowed`.\n- Orders placed through such a key record the tag on the order's attribution as `key_scope`.\n- Secret keys and connected-app keys cannot be limited.\n- Responses are cached per key limit: a limited key never receives a response cached for the whole store, and the reverse.\n","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"23497b63-1a0b-4f70-a5d0-9eec416be49d":{"url":"https://api.tybritelabs.com","description":"Production API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"**API Key Authentication**\n \nUse your API key in the Authorization header:\n```\nAuthorization: Bearer tybrite_sk_live_YOUR_KEY\n```\n \n**Key Types:**\n \n**Secret Keys (Server-Side Only):**\n- Format: `tybrite_sk_live_*` (production) or `tybrite_sk_test_*` (sandbox)\n- Full read/write access to all endpoints\n- ⚠️ NEVER expose in client-side code or public repositories\n- Required for: every write a shopper does not make for themselves, authentication, payment verification, AI recommendations\n \n**Publishable Keys (Client-Safe):**\n- Format: `tybrite_pk_live_*` (production) or `tybrite_pk_test_*` (sandbox)\n- Catalogue reads, plus the actions a shopper takes for themselves\n- ✅ Safe for client-side JavaScript, mobile apps, and public code\n- Allowed for: browsing products, search, CMS content, pricing queries, cart and wishlist,\n reviews, storefront events, and the Agent API's quotes, cart drafts and checkout intents\n \n**Endpoint-Specific Requirements:**\n- **Authentication endpoints** (`/v1/auth/*`): state-changing `POST` calls require a secret key, for store and marketplace keys alike; `GET /v1/auth/me` accepts either key\n- **Payment verification** (`POST /v1/payments/verify`): Secret key required\n- **AI Recommendations** (`POST /v1/recommendations`): Secret key required\n- **Semantic Search** (`POST /v1/search`): Both key types allowed (read-only operation)\n- **Shopper actions** (cart, wishlist, reviews, storefront events, Agent API quotes, cart drafts and checkout intents): Both key types allowed\n- **All other write operations**: Secret key required\n- **All read operations**: Both key types allowed\n \nUsing a publishable key for restricted operations returns 403 Forbidden.\n\n**Limited publishable keys:**\nA publishable key can be limited to the products that carry one tag (for example `starter:jewellery`), created from\nthe store's Developers page. The limit applies to the key, never to the shopper: shopper sign-up and sign-in stay store-wide.\n- Reads return only the slice: products (with their facets, filters, search, brands and specifications), categories and\n subcategories that hold in-slice products, collections, promotions, posts and lookbooks that carry the tag, reviews of\n in-slice products, prices, discovery lists and the store information summary, with every count computed on the slice.\n A product outside the slice answers `404`, as if it did not exist.\n- A write that names a product or variant outside the slice (adding to the cart or wishlist, reserving stock, an order line,\n a review, a promotion calculation, a storefront event) answers `403` with the error code `out_of_scope`, and nothing is\n written or reserved. An order is refused as a whole.\n- A route that carries no slice behaviour is not available to the key: it answers `403` with `endpoint_not_allowed`.\n- Orders placed through such a key record the tag on the order's attribution as `key_scope`.\n- Secret keys and connected-app keys cannot be limited.\n- Responses are cached per key limit: a limited key never receives a response cached for the whole store, and the reverse.\n","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"**API Key Authentication**\n \nUse your API key in the Authorization header:\n```\nAuthorization: Bearer tybrite_sk_live_YOUR_KEY\n```\n \n**Key Types:**\n \n**Secret Keys (Server-Side Only):**\n- Format: `tybrite_sk_live_*` (production) or `tybrite_sk_test_*` (sandbox)\n- Full read/write access to all endpoints\n- ⚠️ NEVER expose in client-side code or public repositories\n- Required for: every write a shopper does not make for themselves, authentication, payment verification, AI recommendations\n \n**Publishable Keys (Client-Safe):**\n- Format: `tybrite_pk_live_*` (production) or `tybrite_pk_test_*` (sandbox)\n- Catalogue reads, plus the actions a shopper takes for themselves\n- ✅ Safe for client-side JavaScript, mobile apps, and public code\n- Allowed for: browsing products, search, CMS content, pricing queries, cart and wishlist,\n reviews, storefront events, and the Agent API's quotes, cart drafts and checkout intents\n \n**Endpoint-Specific Requirements:**\n- **Authentication endpoints** (`/v1/auth/*`): state-changing `POST` calls require a secret key, for store and marketplace keys alike; `GET /v1/auth/me` accepts either key\n- **Payment verification** (`POST /v1/payments/verify`): Secret key required\n- **AI Recommendations** (`POST /v1/recommendations`): Secret key required\n- **Semantic Search** (`POST /v1/search`): Both key types allowed (read-only operation)\n- **Shopper actions** (cart, wishlist, reviews, storefront events, Agent API quotes, cart drafts and checkout intents): Both key types allowed\n- **All other write operations**: Secret key required\n- **All read operations**: Both key types allowed\n \nUsing a publishable key for restricted operations returns 403 Forbidden.\n\n**Limited publishable keys:**\nA publishable key can be limited to the products that carry one tag (for example `starter:jewellery`), created from\nthe store's Developers page. The limit applies to the key, never to the shopper: shopper sign-up and sign-in stay store-wide.\n- Reads return only the slice: products (with their facets, filters, search, brands and specifications), categories and\n subcategories that hold in-slice products, collections, promotions, posts and lookbooks that carry the tag, reviews of\n in-slice products, prices, discovery lists and the store information summary, with every count computed on the slice.\n A product outside the slice answers `404`, as if it did not exist.\n- A write that names a product or variant outside the slice (adding to the cart or wishlist, reserving stock, an order line,\n a review, a promotion calculation, a storefront event) answers `403` with the error code `out_of_scope`, and nothing is\n written or reserved. An order is refused as a whole.\n- A route that carries no slice behaviour is not available to the key: it answers `403` with `endpoint_not_allowed`.\n- Orders placed through such a key record the tag on the order's attribution as `key_scope`.\n- Secret keys and connected-app keys cannot be limited.\n- Responses are cached per key limit: a limited key never receives a response cached for the whole store, and the reverse.\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"tybritelabs","siteName":"Galactic Core API Documentation","title":"Create order - Galactic Core API Documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-24T23:48:17.613Z","originalFileLocation":"api-reference/orders/create-order.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a new order with HMAC signature verification and idempotency protection. 🔐 HMAC Signing (REQUIRED) All order creation requests MUST include HMAC-SHA256 signature for security: 1. Generate Timestamp: Get current Unix timestamp in seconds 2. Create Payload: Concatenate timestamp + \u0026quot;.\u0026quot; + JSON_body 3. Sign Payload: HMAC-SHA256(hmac_secret, payload) → base64 encode 4. Include Headers: - X-Timestamp: Unix time in seconds or milliseconds (within 5 minutes of server time) - X-Signature: Base64-encoded HMAC signature Example (Node.js): 🔄 Idempotency Protection Include Idempotency-Key header to prevent duplicate orders on retry. A replay with the same key and body returns the original order (200) and creates no second order. ⚠️ Security Notes: - HMAC secret is displayed in the Integrations page (Developer section) - Never expose HMAC secret in client-side code - Regenerate secret immediately if compromised - Requests with invalid/missing signatures return 401 Unauthorized - Timestamps older than 5 minutes are rejected to prevent replay attacks Orders with nothing to ship An order whose items are all downloads, codes, event tickets or services needs no delivery address and is quoted no delivery charge. The method is derived from the items (fulfillment_method none), so shipping_address can be left out and shipping_amount is 0. A mixed basket is quoted for its shipped items only. Each item\u0026#x27;s kind is stored on the line as fulfilment_kind, and the delivery of each purchased unit is tracked after payment. - Billing location. Because nothing ships, billing_address.country_code and billing_address.postal_code decide the tax; without them the order is refused with 400 billing_location_required. - Event tickets. Checkout refuses a ticket whose sale has not opened or has closed (409 ticket_sale_closed), an event that has ended (409 ticket_event_ended), more units than max_per_order (400 ticket_limit_exceeded) and a sold-out ticket type or full venue (409 insufficient_stock). 409 not_available marks an item that can no longer be sold by the store. items[].attendee_names names the people on group tickets. - Line fields. items[].custom_fields answers the merchant\u0026#x27;s fields for the line. A required field that is empty on an event ticket or a code is refused with 400 line_field_required, with details.item_index and details.field_name. - Free orders. A zero-total order of downloads and event tickets is created paid with payment_method free, for a signed-in shopper identified by x-auth-token, x-external-auth or a customer_id linked to a shopper account. Otherwise it is refused with 409 account_required. 🛡️ Server-side price validation (anti-tampering) HMAC proves the body wasn\u0026#x27;t altered in transit; it does not prove the amounts are honest. So the server independently recomputes the order from authoritative data and rejects any mismatch — you cannot set your own prices or discounts: - Item prices are recomputed from the live catalog. The catalog price of a line is the variant\u0026#x27;s online sale price when one applies, otherwise its online price (its in-store price when no online price is set). unit_price / total_price that don\u0026#x27;t match the catalog price → 400 price_mismatch. (The stored order always uses the catalog price, never the value you send.) - subtotal, tax_amount, total_amount must reconcile to subtotal + tax + shipping − discount over those catalog prices → otherwise 400 price_mismatch. - tax_amount is calculated by the server when you omit it: for the shipping_address when the store has automatic tax (the shipping charge is rated as its own line), otherwise at the store\u0026#x27;s own rate — on the line totals, plus the shipping charge when the store charges tax on shipping. At the store\u0026#x27;s own rate a tax_amount you send must match that figure to the cent → otherwise 400 price_mismatch. When the store\u0026#x27;s prices include tax, the tax is taken from what the shopper pays (line totals − discount, plus shipping when taxed) and subtotal is the line totals minus that tax. POST /v1/tax/preview returns the same figure before checkout. - discount_amount is validated against the discount the promotions / gift card you claim actually grant (computed server-side from promotion_usages + gift_card_redemption). A discount_amount greater than that legitimate maximum → 400 discount_invalid. A discount with no real promotion/gift card behind it → max is 0. (You may apply less than the maximum.) - shipping_amount is checked on every order, $0 included, and may not be negative: - With a carrier option (shipping_rate_id + shipping_rate_source, or shippo_rate_id), the option is fetched again from its source — the store\u0026#x27;s carrier account, or its custom shipping extension re-quoted for shipping_address and shipping_parcel. An unknown, expired or foreign option, one in another currency, or a test-mode option on a live order → 400 shipping_rate_invalid; an amount that differs from the option → 400 price_mismatch. - Otherwise, when the store has delivery rates and the destination is known (shipping_latitude/shipping_longitude, or a shipping_address that can be located), the amount must equal the store\u0026#x27;s charge for that address, free-delivery thresholds measured against the line totals after discount_amount → otherwise 400 price_mismatch. A destination the store does not deliver to → 400 shipping_not_deliverable. - With a named delivery option (shipping_option_id of the form opt:), the amount must equal that option\u0026#x27;s fee for the address and basket → otherwise 400 price_mismatch. An option the order does not qualify for → 400 shipping_option_unavailable. - On a pickup order (fulfillment_method: pickup), the amount must equal the location\u0026#x27;s pickup fee → otherwise 400 price_mismatch. A location that is not one of the store\u0026#x27;s pickup locations, or an order below its minimum → 400 pickup_unavailable. Tax is calculated at the pickup location. - A store with no delivery rates (it ships through its own arrangements) accepts the amount sent; so does an order whose destination cannot be located. Such an order is recorded as not checked. - When shipping cannot be checked because the service is unreachable → 502 shipping_unavailable; the order is not created. In short: send the real catalog prices and the actual promotions/gift card the shopper is entitled to. Don\u0026#x27;t compute or invent prices/discounts client-side — the server is the authority.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Galactic Core API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tybritelabs/d0xYWWdjx3Q9ZfW_/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/tybritelabs/d0xYWWdjx3Q9ZfW_/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tybritelabs/d0xYWWdjx3Q9ZfW_/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/tybritelabs/d0xYWWdjx3Q9ZfW_/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/tybritelabs/d0xYWWdjx3Q9ZfW_/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tybritelabs/d0xYWWdjx3Q9ZfW_/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tybritelabs/d0xYWWdjx3Q9ZfW_/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/tybritelabs/d0xYWWdjx3Q9ZfW_/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/tybritelabs/d0xYWWdjx3Q9ZfW_/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create order - Galactic Core API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new order with HMAC signature verification and idempotency protection. 🔐 HMAC Signing (REQUIRED) All order creation requests MUST include HMAC-SHA256 signature for security: 1. Generate Timestamp: Get current Unix timestamp in seconds 2. Create Payload: Concatenate timestamp + \u0026quot;.\u0026quot; + JSON_body 3. Sign Payload: HMAC-SHA256(hmac_secret, payload) → base64 encode 4. Include Headers: - X-Timestamp: Unix time in seconds or milliseconds (within 5 minutes of server time) - X-Signature: Base64-encoded HMAC signature Example (Node.js): 🔄 Idempotency Protection Include Idempotency-Key header to prevent duplicate orders on retry. A replay with the same key and body returns the original order (200) and creates no second order. ⚠️ Security Notes: - HMAC secret is displayed in the Integrations page (Developer section) - Never expose HMAC secret in client-side code - Regenerate secret immediately if compromised - Requests with invalid/missing signatures return 401 Unauthorized - Timestamps older than 5 minutes are rejected to prevent replay attacks Orders with nothing to ship An order whose items are all downloads, codes, event tickets or services needs no delivery address and is quoted no delivery charge. The method is derived from the items (fulfillment_method none), so shipping_address can be left out and shipping_amount is 0. A mixed basket is quoted for its shipped items only. Each item\u0026#x27;s kind is stored on the line as fulfilment_kind, and the delivery of each purchased unit is tracked after payment. - Billing location. Because nothing ships, billing_address.country_code and billing_address.postal_code decide the tax; without them the order is refused with 400 billing_location_required. - Event tickets. Checkout refuses a ticket whose sale has not opened or has closed (409 ticket_sale_closed), an event that has ended (409 ticket_event_ended), more units than max_per_order (400 ticket_limit_exceeded) and a sold-out ticket type or full venue (409 insufficient_stock). 409 not_available marks an item that can no longer be sold by the store. items[].attendee_names names the people on group tickets. - Line fields. items[].custom_fields answers the merchant\u0026#x27;s fields for the line. A required field that is empty on an event ticket or a code is refused with 400 line_field_required, with details.item_index and details.field_name. - Free orders. A zero-total order of downloads and event tickets is created paid with payment_method free, for a signed-in shopper identified by x-auth-token, x-external-auth or a customer_id linked to a shopper account. Otherwise it is refused with 409 account_required. 🛡️ Server-side price validation (anti-tampering) HMAC proves the body wasn\u0026#x27;t altered in transit; it does not prove the amounts are honest. So the server independently recomputes the order from authoritative data and rejects any mismatch — you cannot set your own prices or discounts: - Item prices are recomputed from the live catalog. The catalog price of a line is the variant\u0026#x27;s online sale price when one applies, otherwise its online price (its in-store price when no online price is set). unit_price / total_price that don\u0026#x27;t match the catalog price → 400 price_mismatch. (The stored order always uses the catalog price, never the value you send.) - subtotal, tax_amount, total_amount must reconcile to subtotal + tax + shipping − discount over those catalog prices → otherwise 400 price_mismatch. - tax_amount is calculated by the server when you omit it: for the shipping_address when the store has automatic tax (the shipping charge is rated as its own line), otherwise at the store\u0026#x27;s own rate — on the line totals, plus the shipping charge when the store charges tax on shipping. At the store\u0026#x27;s own rate a tax_amount you send must match that figure to the cent → otherwise 400 price_mismatch. When the store\u0026#x27;s prices include tax, the tax is taken from what the shopper pays (line totals − discount, plus shipping when taxed) and subtotal is the line totals minus that tax. POST /v1/tax/preview returns the same figure before checkout. - discount_amount is validated against the discount the promotions / gift card you claim actually grant (computed server-side from promotion_usages + gift_card_redemption). A discount_amount greater than that legitimate maximum → 400 discount_invalid. A discount with no real promotion/gift card behind it → max is 0. (You may apply less than the maximum.) - shipping_amount is checked on every order, $0 included, and may not be negative: - With a carrier option (shipping_rate_id + shipping_rate_source, or shippo_rate_id), the option is fetched again from its source — the store\u0026#x27;s carrier account, or its custom shipping extension re-quoted for shipping_address and shipping_parcel. An unknown, expired or foreign option, one in another currency, or a test-mode option on a live order → 400 shipping_rate_invalid; an amount that differs from the option → 400 price_mismatch. - Otherwise, when the store has delivery rates and the destination is known (shipping_latitude/shipping_longitude, or a shipping_address that can be located), the amount must equal the store\u0026#x27;s charge for that address, free-delivery thresholds measured against the line totals after discount_amount → otherwise 400 price_mismatch. A destination the store does not deliver to → 400 shipping_not_deliverable. - With a named delivery option (shipping_option_id of the form opt:), the amount must equal that option\u0026#x27;s fee for the address and basket → otherwise 400 price_mismatch. An option the order does not qualify for → 400 shipping_option_unavailable. - On a pickup order (fulfillment_method: pickup), the amount must equal the location\u0026#x27;s pickup fee → otherwise 400 price_mismatch. A location that is not one of the store\u0026#x27;s pickup locations, or an order below its minimum → 400 pickup_unavailable. Tax is calculated at the pickup location. - A store with no delivery rates (it ships through its own arrangements) accepts the amount sent; so does an order whose destination cannot be located. Such an order is recorded as not checked. - When shipping cannot be checked because the service is unreachable → 502 shipping_unavailable; the order is not created. In short: send the real catalog prices and the actual promotions/gift card the shopper is entitled to. Don\u0026#x27;t compute or invent prices/discounts client-side — the server is the authority.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Galactic Core API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tybritelabs.com/api-reference/orders/create-order\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tybritelabs.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Create+order\u0026amp;description=Create+a+new+order+with+HMAC+signature+verification+and+idempotency+protection.%0A%0A**%F0%9F%94%90+HMAC+Signing+%28REQUIRED%29**%0A++%0AAll+order+creation+requests+MUST+include+HMAC-\u0026amp;theme=e2a958a3415fbc57a167c80a\u0026amp;signature=4059f6a7787b278d9165669ebe76f3fc0ac14e92bf143b424445b9e9627dee65\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create order - Galactic Core API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new order with HMAC signature verification and idempotency protection. 🔐 HMAC Signing (REQUIRED) All order creation requests MUST include HMAC-SHA256 signature for security: 1. Generate Timestamp: Get current Unix timestamp in seconds 2. Create Payload: Concatenate timestamp + \u0026quot;.\u0026quot; + JSON_body 3. Sign Payload: HMAC-SHA256(hmac_secret, payload) → base64 encode 4. Include Headers: - X-Timestamp: Unix time in seconds or milliseconds (within 5 minutes of server time) - X-Signature: Base64-encoded HMAC signature Example (Node.js): 🔄 Idempotency Protection Include Idempotency-Key header to prevent duplicate orders on retry. A replay with the same key and body returns the original order (200) and creates no second order. ⚠️ Security Notes: - HMAC secret is displayed in the Integrations page (Developer section) - Never expose HMAC secret in client-side code - Regenerate secret immediately if compromised - Requests with invalid/missing signatures return 401 Unauthorized - Timestamps older than 5 minutes are rejected to prevent replay attacks Orders with nothing to ship An order whose items are all downloads, codes, event tickets or services needs no delivery address and is quoted no delivery charge. The method is derived from the items (fulfillment_method none), so shipping_address can be left out and shipping_amount is 0. A mixed basket is quoted for its shipped items only. Each item\u0026#x27;s kind is stored on the line as fulfilment_kind, and the delivery of each purchased unit is tracked after payment. - Billing location. Because nothing ships, billing_address.country_code and billing_address.postal_code decide the tax; without them the order is refused with 400 billing_location_required. - Event tickets. Checkout refuses a ticket whose sale has not opened or has closed (409 ticket_sale_closed), an event that has ended (409 ticket_event_ended), more units than max_per_order (400 ticket_limit_exceeded) and a sold-out ticket type or full venue (409 insufficient_stock). 409 not_available marks an item that can no longer be sold by the store. items[].attendee_names names the people on group tickets. - Line fields. items[].custom_fields answers the merchant\u0026#x27;s fields for the line. A required field that is empty on an event ticket or a code is refused with 400 line_field_required, with details.item_index and details.field_name. - Free orders. A zero-total order of downloads and event tickets is created paid with payment_method free, for a signed-in shopper identified by x-auth-token, x-external-auth or a customer_id linked to a shopper account. Otherwise it is refused with 409 account_required. 🛡️ Server-side price validation (anti-tampering) HMAC proves the body wasn\u0026#x27;t altered in transit; it does not prove the amounts are honest. So the server independently recomputes the order from authoritative data and rejects any mismatch — you cannot set your own prices or discounts: - Item prices are recomputed from the live catalog. The catalog price of a line is the variant\u0026#x27;s online sale price when one applies, otherwise its online price (its in-store price when no online price is set). unit_price / total_price that don\u0026#x27;t match the catalog price → 400 price_mismatch. (The stored order always uses the catalog price, never the value you send.) - subtotal, tax_amount, total_amount must reconcile to subtotal + tax + shipping − discount over those catalog prices → otherwise 400 price_mismatch. - tax_amount is calculated by the server when you omit it: for the shipping_address when the store has automatic tax (the shipping charge is rated as its own line), otherwise at the store\u0026#x27;s own rate — on the line totals, plus the shipping charge when the store charges tax on shipping. At the store\u0026#x27;s own rate a tax_amount you send must match that figure to the cent → otherwise 400 price_mismatch. When the store\u0026#x27;s prices include tax, the tax is taken from what the shopper pays (line totals − discount, plus shipping when taxed) and subtotal is the line totals minus that tax. POST /v1/tax/preview returns the same figure before checkout. - discount_amount is validated against the discount the promotions / gift card you claim actually grant (computed server-side from promotion_usages + gift_card_redemption). A discount_amount greater than that legitimate maximum → 400 discount_invalid. A discount with no real promotion/gift card behind it → max is 0. (You may apply less than the maximum.) - shipping_amount is checked on every order, $0 included, and may not be negative: - With a carrier option (shipping_rate_id + shipping_rate_source, or shippo_rate_id), the option is fetched again from its source — the store\u0026#x27;s carrier account, or its custom shipping extension re-quoted for shipping_address and shipping_parcel. An unknown, expired or foreign option, one in another currency, or a test-mode option on a live order → 400 shipping_rate_invalid; an amount that differs from the option → 400 price_mismatch. - Otherwise, when the store has delivery rates and the destination is known (shipping_latitude/shipping_longitude, or a shipping_address that can be located), the amount must equal the store\u0026#x27;s charge for that address, free-delivery thresholds measured against the line totals after discount_amount → otherwise 400 price_mismatch. A destination the store does not deliver to → 400 shipping_not_deliverable. - With a named delivery option (shipping_option_id of the form opt:), the amount must equal that option\u0026#x27;s fee for the address and basket → otherwise 400 price_mismatch. An option the order does not qualify for → 400 shipping_option_unavailable. - On a pickup order (fulfillment_method: pickup), the amount must equal the location\u0026#x27;s pickup fee → otherwise 400 price_mismatch. A location that is not one of the store\u0026#x27;s pickup locations, or an order below its minimum → 400 pickup_unavailable. Tax is calculated at the pickup location. - A store with no delivery rates (it ships through its own arrangements) accepts the amount sent; so does an order whose destination cannot be located. Such an order is recorded as not checked. - When shipping cannot be checked because the service is unreachable → 502 shipping_unavailable; the order is not created. In short: send the real catalog prices and the actual promotions/gift card the shopper is entitled to. Don\u0026#x27;t compute or invent prices/discounts client-side — the server is the authority.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tybritelabs.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Create+order\u0026amp;description=Create+a+new+order+with+HMAC+signature+verification+and+idempotency+protection.%0A%0A**%F0%9F%94%90+HMAC+Signing+%28REQUIRED%29**%0A++%0AAll+order+creation+requests+MUST+include+HMAC-\u0026amp;theme=e2a958a3415fbc57a167c80a\u0026amp;signature=4059f6a7787b278d9165669ebe76f3fc0ac14e92bf143b424445b9e9627dee65\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/tybritelabs/d0xYWWdjx3Q9ZfW_/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Galactic Core API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3b82f6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tybritelabs.com/api-reference/orders/create-order\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/orders/create-order.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tybritelabs.com/#organization\",\"name\":\"Galactic Core API Documentation\",\"url\":\"https://docs.tybritelabs.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tybritelabs/9cNSmgnBxs-QU_UC/branding/gc-long-blue.png?fit=max\u0026auto=format\u0026n=9cNSmgnBxs-QU_UC\u0026q=85\u0026s=88d64ea989973d874ed73437459487f7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tybritelabs.com#website\",\"name\":\"Galactic Core API Documentation\",\"url\":\"https://docs.tybritelabs.com\",\"publisher\":{\"@id\":\"https://docs.tybritelabs.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tybritelabs.com/api-reference/orders/create-order#webpage\",\"url\":\"https://docs.tybritelabs.com/api-reference/orders/create-order\",\"name\":\"Create order\",\"description\":\"Create a new order with HMAC signature verification and idempotency protection. 🔐 HMAC Signing (REQUIRED) All order creation requests MUST include HMAC-SHA256 signature for security: 1. Generate Timestamp: Get current Unix timestamp in seconds 2. Create Payload: Concatenate timestamp + \\\".\\\" + JSON_body 3. Sign Payload: HMAC-SHA256(hmac_secret, payload) → base64 encode 4. Include Headers: - X-Timestamp: Unix time in seconds or milliseconds (within 5 minutes of server time) - X-Signature: Base64-encoded HMAC signature Example (Node.js): 🔄 Idempotency Protection Include Idempotency-Key header to prevent duplicate orders on retry. A replay with the same key and body returns the original order (200) and creates no second order. ⚠️ Security Notes: - HMAC secret is displayed in the Integrations page (Developer section) - Never expose HMAC secret in client-side code - Regenerate secret immediately if compromised - Requests with invalid/missing signatures return 401 Unauthorized - Timestamps older than 5 minutes are rejected to prevent replay attacks Orders with nothing to ship An order whose items are all downloads, codes, event tickets or services needs no delivery address and is quoted no delivery charge. The method is derived from the items (fulfillment_method none), so shipping_address can be left out and shipping_amount is 0. A mixed basket is quoted for its shipped items only. Each item's kind is stored on the line as fulfilment_kind, and the delivery of each purchased unit is tracked after payment. - Billing location. Because nothing ships, billing_address.country_code and billing_address.postal_code decide the tax; without them the order is refused with 400 billing_location_required. - Event tickets. Checkout refuses a ticket whose sale has not opened or has closed (409 ticket_sale_closed), an event that has ended (409 ticket_event_ended), more units than max_per_order (400 ticket_limit_exceeded) and a sold-out ticket type or full venue (409 insufficient_stock). 409 not_available marks an item that can no longer be sold by the store. items[].attendee_names names the people on group tickets. - Line fields. items[].custom_fields answers the merchant's fields for the line. A required field that is empty on an event ticket or a code is refused with 400 line_field_required, with details.item_index and details.field_name. - Free orders. A zero-total order of downloads and event tickets is created paid with payment_method free, for a signed-in shopper identified by x-auth-token, x-external-auth or a customer_id linked to a shopper account. Otherwise it is refused with 409 account_required. 🛡️ Server-side price validation (anti-tampering) HMAC proves the body wasn't altered in transit; it does not prove the amounts are honest. So the server independently recomputes the order from authoritative data and rejects any mismatch — you cannot set your own prices or discounts: - Item prices are recomputed from the live catalog. The catalog price of a line is the variant's online sale price when one applies, otherwise its online price (its in-store price when no online price is set). unit_price / total_price that don't match the catalog price → 400 price_mismatch. (The stored order always uses the catalog price, never the value you send.) - subtotal, tax_amount, total_amount must reconcile to subtotal + tax + shipping − discount over those catalog prices → otherwise 400 price_mismatch. - tax_amount is calculated by the server when you omit it: for the shipping_address when the store has automatic tax (the shipping charge is rated as its own line), otherwise at the store's own rate — on the line totals, plus the shipping charge when the store charges tax on shipping. At the store's own rate a tax_amount you send must match that figure to the cent → otherwise 400 price_mismatch. When the store's prices include tax, the tax is taken from what the shopper pays (line totals − discount, plus shipping when taxed) and subtotal is the line totals minus that tax. POST /v1/tax/preview returns the same figure before checkout. - discount_amount is validated against the discount the promotions / gift card you claim actually grant (computed server-side from promotion_usages + gift_card_redemption). A discount_amount greater than that legitimate maximum → 400 discount_invalid. A discount with no real promotion/gift card behind it → max is 0. (You may apply less than the maximum.) - shipping_amount is checked on every order, $0 included, and may not be negative: - With a carrier option (shipping_rate_id + shipping_rate_source, or shippo_rate_id), the option is fetched again from its source — the store's carrier account, or its custom shipping extension re-quoted for shipping_address and shipping_parcel. An unknown, expired or foreign option, one in another currency, or a test-mode option on a live order → 400 shipping_rate_invalid; an amount that differs from the option → 400 price_mismatch. - Otherwise, when the store has delivery rates and the destination is known (shipping_latitude/shipping_longitude, or a shipping_address that can be located), the amount must equal the store's charge for that address, free-delivery thresholds measured against the line totals after discount_amount → otherwise 400 price_mismatch. A destination the store does not deliver to → 400 shipping_not_deliverable. - With a named delivery option (shipping_option_id of the form opt:), the amount must equal that option's fee for the address and basket → otherwise 400 price_mismatch. An option the order does not qualify for → 400 shipping_option_unavailable. - On a pickup order (fulfillment_method: pickup), the amount must equal the location's pickup fee → otherwise 400 price_mismatch. A location that is not one of the store's pickup locations, or an order below its minimum → 400 pickup_unavailable. Tax is calculated at the pickup location. - A store with no delivery rates (it ships through its own arrangements) accepts the amount sent; so does an order whose destination cannot be located. Such an order is recorded as not checked. - When shipping cannot be checked because the service is unreachable → 502 shipping_unavailable; the order is not created. In short: send the real catalog prices and the actual promotions/gift card the shopper is entitled to. Don't compute or invent prices/discounts client-side — the server is the authority.\",\"dateModified\":\"2026-11-24T23:48:17.613Z\",\"isPartOf\":{\"@id\":\"https://docs.tybritelabs.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tybritelabs.com/api-reference/orders/create-order#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tybritelabs.com/api-reference/orders/create-order#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Orders\",\"item\":\"https://docs.tybritelabs.com/api-reference/orders/list-orders\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create order\",\"item\":\"https://docs.tybritelabs.com/api-reference/orders/create-order\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.tybritelabs.com/api-reference/orders/create-order#apireference\",\"headline\":\"Create order\",\"name\":\"Create order\",\"description\":\"Create a new order with HMAC signature verification and idempotency protection. 🔐 HMAC Signing (REQUIRED) All order creation requests MUST include HMAC-SHA256 signature for security: 1. Generate Timestamp: Get current Unix timestamp in seconds 2. Create Payload: Concatenate timestamp + \\\".\\\" + JSON_body 3. Sign Payload: HMAC-SHA256(hmac_secret, payload) → base64 encode 4. Include Headers: - X-Timestamp: Unix time in seconds or milliseconds (within 5 minutes of server time) - X-Signature: Base64-encoded HMAC signature Example (Node.js): 🔄 Idempotency Protection Include Idempotency-Key header to prevent duplicate orders on retry. A replay with the same key and body returns the original order (200) and creates no second order. ⚠️ Security Notes: - HMAC secret is displayed in the Integrations page (Developer section) - Never expose HMAC secret in client-side code - Regenerate secret immediately if compromised - Requests with invalid/missing signatures return 401 Unauthorized - Timestamps older than 5 minutes are rejected to prevent replay attacks Orders with nothing to ship An order whose items are all downloads, codes, event tickets or services needs no delivery address and is quoted no delivery charge. The method is derived from the items (fulfillment_method none), so shipping_address can be left out and shipping_amount is 0. A mixed basket is quoted for its shipped items only. Each item's kind is stored on the line as fulfilment_kind, and the delivery of each purchased unit is tracked after payment. - Billing location. Because nothing ships, billing_address.country_code and billing_address.postal_code decide the tax; without them the order is refused with 400 billing_location_required. - Event tickets. Checkout refuses a ticket whose sale has not opened or has closed (409 ticket_sale_closed), an event that has ended (409 ticket_event_ended), more units than max_per_order (400 ticket_limit_exceeded) and a sold-out ticket type or full venue (409 insufficient_stock). 409 not_available marks an item that can no longer be sold by the store. items[].attendee_names names the people on group tickets. - Line fields. items[].custom_fields answers the merchant's fields for the line. A required field that is empty on an event ticket or a code is refused with 400 line_field_required, with details.item_index and details.field_name. - Free orders. A zero-total order of downloads and event tickets is created paid with payment_method free, for a signed-in shopper identified by x-auth-token, x-external-auth or a customer_id linked to a shopper account. Otherwise it is refused with 409 account_required. 🛡️ Server-side price validation (anti-tampering) HMAC proves the body wasn't altered in transit; it does not prove the amounts are honest. So the server independently recomputes the order from authoritative data and rejects any mismatch — you cannot set your own prices or discounts: - Item prices are recomputed from the live catalog. The catalog price of a line is the variant's online sale price when one applies, otherwise its online price (its in-store price when no online price is set). unit_price / total_price that don't match the catalog price → 400 price_mismatch. (The stored order always uses the catalog price, never the value you send.) - subtotal, tax_amount, total_amount must reconcile to subtotal + tax + shipping − discount over those catalog prices → otherwise 400 price_mismatch. - tax_amount is calculated by the server when you omit it: for the shipping_address when the store has automatic tax (the shipping charge is rated as its own line), otherwise at the store's own rate — on the line totals, plus the shipping charge when the store charges tax on shipping. At the store's own rate a tax_amount you send must match that figure to the cent → otherwise 400 price_mismatch. When the store's prices include tax, the tax is taken from what the shopper pays (line totals − discount, plus shipping when taxed) and subtotal is the line totals minus that tax. POST /v1/tax/preview returns the same figure before checkout. - discount_amount is validated against the discount the promotions / gift card you claim actually grant (computed server-side from promotion_usages + gift_card_redemption). A discount_amount greater than that legitimate maximum → 400 discount_invalid. A discount with no real promotion/gift card behind it → max is 0. (You may apply less than the maximum.) - shipping_amount is checked on every order, $0 included, and may not be negative: - With a carrier option (shipping_rate_id + shipping_rate_source, or shippo_rate_id), the option is fetched again from its source — the store's carrier account, or its custom shipping extension re-quoted for shipping_address and shipping_parcel. An unknown, expired or foreign option, one in another currency, or a test-mode option on a live order → 400 shipping_rate_invalid; an amount that differs from the option → 400 price_mismatch. - Otherwise, when the store has delivery rates and the destination is known (shipping_latitude/shipping_longitude, or a shipping_address that can be located), the amount must equal the store's charge for that address, free-delivery thresholds measured against the line totals after discount_amount → otherwise 400 price_mismatch. A destination the store does not deliver to → 400 shipping_not_deliverable. - With a named delivery option (shipping_option_id of the form opt:), the amount must equal that option's fee for the address and basket → otherwise 400 price_mismatch. An option the order does not qualify for → 400 shipping_option_unavailable. - On a pickup order (fulfillment_method: pickup), the amount must equal the location's pickup fee → otherwise 400 price_mismatch. A location that is not one of the store's pickup locations, or an order below its minimum → 400 pickup_unavailable. Tax is calculated at the pickup location. - A store with no delivery rates (it ships through its own arrangements) accepts the amount sent; so does an order whose destination cannot be located. Such an order is recorded as not checked. - When shipping cannot be checked because the service is unreachable → 502 shipping_unavailable; the order is not created. In short: send the real catalog prices and the actual promotions/gift card the shopper is entitled to. Don't compute or invent prices/discounts client-side — the server is the authority.\",\"url\":\"https://docs.tybritelabs.com/api-reference/orders/create-order\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tybritelabs.com/api-reference/orders/create-order#webpage\"},\"dateModified\":\"2026-11-24T23:48:17.613Z\",\"publisher\":{\"@id\":\"https://docs.tybritelabs.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tybritelabs.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Galactic Core API Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Galactic Core API Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/orders/create-order.md","siteName":"Galactic Core API Documentation","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://gc.tybritelabs.com/dashboard"},{"anchor":"GitHub","icon":"github","href":"https://github.com/tybrite"},{"anchor":"Support","icon":"envelope","href":"mailto:support@tybrite.com"}]},"products":[{"product":"Galactic Core","icon":"cart-shopping","description":"Programmable commerce infrastructure","tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":""}]},{"tab":"API Reference","groups":[{"group":"Reference","pages":[{"title":"Introduction","href":"/api-reference/introduction"}]},{"group":"System","pages":[{"title":"API information","deprecated":null,"version":null,"openapi":"/openapi.yaml get /","href":"/api-reference/system/api-information"},{"title":"Health check","deprecated":null,"version":null,"openapi":"/tldp/openapi.yaml get /v1/health","href":"/api-reference/system/health-check"},{"title":"Get comprehensive store information","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/store/info","href":"/api-reference/system/get-comprehensive-store-information"}]},{"group":"Store","pages":[{"title":"Get the store profile","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/store/profile","href":"/api-reference/store/get-the-store-profile"},{"title":"List published policies","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/store/policies","href":"/api-reference/store/list-published-policies"},{"title":"Get a published policy","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/store/policies/{slug}","href":"/api-reference/store/get-a-published-policy"}]},{"group":"Products","pages":[{"title":"List products with filtering and pagination","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products","href":"/api-reference/products/list-products-with-filtering-and-pagination"},{"title":"List brands","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/brands","href":"/api-reference/products/list-brands"},{"title":"List the values a product list can be filtered by","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products/facets","href":"/api-reference/products/list-the-values-a-product-list-can-be-filtered-by"},{"title":"Get product by ID or variant ID","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products/{id}","href":"/api-reference/products/get-product-by-id-or-variant-id"},{"title":"Get product by SEO-friendly slug","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products/by-slug/{slug}","href":"/api-reference/products/get-product-by-seo-friendly-slug"},{"title":"Get a variant's specifications","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products/{id}/specifications","href":"/api-reference/products/get-a-variants-specifications"},{"title":"Get a product's custom fields","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/products/{id}/custom-fields","href":"/api-reference/products/get-a-products-custom-fields"},{"title":"List product specifications","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/product-specifications","href":"/api-reference/products/list-product-specifications"},{"title":"List product collections","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/product-collections","href":"/api-reference/products/list-product-collections"},{"title":"Get product collection by ID","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/product-collections/{id}","href":"/api-reference/products/get-product-collection-by-id"},{"title":"Get items in a product collection","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/product-collections/{id}/items","href":"/api-reference/products/get-items-in-a-product-collection"}]},{"group":"Taxonomy","pages":[{"title":"List categories","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/categories","href":"/api-reference/taxonomy/list-categories"},{"title":"Get category","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/categories/{id}","href":"/api-reference/taxonomy/get-category"},{"title":"List subcategories","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/subcategories","href":"/api-reference/taxonomy/list-subcategories"},{"title":"Get subcategory by ID","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/subcategories/{id}","href":"/api-reference/taxonomy/get-subcategory-by-id"}]},{"group":"Orders","pages":[{"title":"List orders","description":"Retrieve a paginated list of orders for the store, newest first.\n\nThe list view returns order headers **without line items** for efficiency —\nfetch `GET /v1/orders/{id}` for the full order including its items.\n\n**Response signature**\n\nA call made with a secret key returns `X-Signature` and `X-Signature-Timestamp` when the store has a\nsigning secret, so the caller can verify that the list is the one the platform produced. Verification is described under\nGet order (`GET /v1/orders/{id}`).\n\n**Key Type Support:**\n- ✅ Secret keys (full access)\n- ❌ Publishable keys (forbidden — returns 403)\n\nSupports cursor pagination (`limit` + `cursor`) and optional filters by\n`payment_status`, `order_status`, and `customer_id`.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders","href":"/api-reference/orders/list-orders"},{"title":"Create order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/orders","href":"/api-reference/orders/create-order"},{"title":"Get order details","description":"Retrieve detailed information about a specific order including line items and status.\n\n**Response signature**\n\nA call made with a secret key returns `X-Signature` and `X-Signature-Timestamp` when the store has a\nsigning secret, so the caller can verify that the body is the one the platform produced and was not\nchanged in transit. A call made with a publishable key is not signed. A key issued to a connected app is\nsigned with that app's own signing secret; any other key with the store's signing secret.\n\nTo verify:\n1. Read `X-Signature-Timestamp` (Unix seconds) and `X-Signature` from the response.\n2. Take the decoded response body: the exact bytes received after transport decompression, without\n parsing or re-serialising them.\n3. Compute `HMAC-SHA256(signing_secret, \"{timestamp}.{body}\")` and encode the digest as base64.\n4. Compare it with `X-Signature` in constant time, and reject a response whose timestamp is more than\n five minutes from the current time.\n\nThis is the recipe used to sign requests, applied to the response.\n\nExample verification (Node.js):\n\n```js\nimport { createHmac, timingSafeEqual } from 'node:crypto';\n\nconst headers = { Authorization: `Bearer ${secretKey}` };\nconst res = await fetch(`${baseUrl}/v1/orders/${orderId}`, { headers });\nconst body = await res.text();\nconst timestamp = res.headers.get('X-Signature-Timestamp');\nconst received = Buffer.from(res.headers.get('X-Signature') ?? '');\nconst expected = Buffer.from(\n createHmac('sha256', signingSecret).update(`${timestamp}.${body}`).digest('base64'),\n);\nconst fresh = Math.abs(Date.now() / 1000 - Number(timestamp)) \u003c= 300;\nconst valid = fresh \u0026\u0026 received.length === expected.length \u0026\u0026 timingSafeEqual(received, expected);\n```\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/orders/{id}","href":"/api-reference/orders/get-order-details"},{"title":"Update order","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/orders/{id}","href":"/api-reference/orders/update-order"},{"title":"Reserve stock for checkout","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/checkout/reserve","href":"/api-reference/orders/reserve-stock-for-checkout"}]},{"group":"Payments","pages":[{"title":"Get available payment methods","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/payments/methods","href":"/api-reference/payments/get-available-payment-methods"},{"title":"Initialize payment","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/payments/initialize","href":"/api-reference/payments/initialize-payment"},{"title":"Verify payment status","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/payments/verify","href":"/api-reference/payments/verify-payment-status"}]},{"group":"Cart \u0026 Wishlist","pages":[{"title":"Get cart","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/cart","href":"/api-reference/cart-\u0026-wishlist/get-cart"},{"title":"Clear cart","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/cart","href":"/api-reference/cart-\u0026-wishlist/clear-cart"},{"title":"Add to cart","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/cart/items","href":"/api-reference/cart-\u0026-wishlist/add-to-cart"},{"title":"Remove cart item","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/cart/items/{id}","href":"/api-reference/cart-\u0026-wishlist/remove-cart-item"},{"title":"Update cart item","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/cart/items/{id}","href":"/api-reference/cart-\u0026-wishlist/update-cart-item"},{"title":"Merge carts","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/cart/merge","href":"/api-reference/cart-\u0026-wishlist/merge-carts"},{"title":"Get wishlist","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/wishlist","href":"/api-reference/cart-\u0026-wishlist/get-wishlist"},{"title":"Add to wishlist","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/wishlist","href":"/api-reference/cart-\u0026-wishlist/add-to-wishlist"},{"title":"Remove from wishlist","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/wishlist/{id}","href":"/api-reference/cart-\u0026-wishlist/remove-from-wishlist"},{"title":"Move wishlist item to cart","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/wishlist/move-to-cart","href":"/api-reference/cart-\u0026-wishlist/move-wishlist-item-to-cart"},{"title":"Ask to be told when a variant is back in stock","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/variants/{id}/notify-when-available","href":"/api-reference/cart-\u0026-wishlist/ask-to-be-told-when-a-variant-is-back-in-stock"},{"title":"Record a guest's contact details at checkout","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/cart/checkout-contact","href":"/api-reference/cart-\u0026-wishlist/record-a-guests-contact-details-at-checkout"},{"title":"Restore the cart behind a recovery link","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/cart/checkout-recover","href":"/api-reference/cart-\u0026-wishlist/restore-the-cart-behind-a-recovery-link"}]},{"group":"Marketplace","pages":[{"title":"Check out a multi-merchant cart","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/cart/checkout","href":"/api-reference/marketplace/check-out-a-multi-merchant-cart"},{"title":"Quote a multi-merchant checkout","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/cart/checkout/quote","href":"/api-reference/marketplace/quote-a-multi-merchant-checkout"},{"title":"Get the signed-in shopper's unified marketplace profile","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/customers/me","href":"/api-reference/marketplace/get-the-signed-in-shoppers-unified-marketplace-profile"},{"title":"Get the signed-in shopper's marketplace wallet","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/customers/me/wallet","href":"/api-reference/marketplace/get-the-signed-in-shoppers-marketplace-wallet"},{"title":"Get marketplace information","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/marketplace/info","href":"/api-reference/marketplace/get-marketplace-information"},{"title":"List the marketplace's merchants","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/marketplace/info/merchants","href":"/api-reference/marketplace/list-the-marketplaces-merchants"},{"title":"Get placements for several slots","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/marketplace/ad-slots","href":"/api-reference/marketplace/get-placements-for-several-slots"},{"title":"Get placements for a slot","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/marketplace/ad-slots/{slot_key}","href":"/api-reference/marketplace/get-placements-for-a-slot"},{"title":"Log an ad impression or click","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/marketplace/ad-events","href":"/api-reference/marketplace/log-an-ad-impression-or-click"},{"title":"List operator-curated merchandising sections","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/marketplace/collections","href":"/api-reference/marketplace/list-operator-curated-merchandising-sections"},{"title":"Get one curated section with its members","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/marketplace/collections/{slug}","href":"/api-reference/marketplace/get-one-curated-section-with-its-members"}]},{"group":"Recommendations","pages":[{"title":"Get product recommendations","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/recommendations","href":"/api-reference/recommendations/get-product-recommendations"}]},{"group":"Discovery","pages":[{"title":"Most-viewed products (windowed)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/discovery/most-viewed","href":"/api-reference/discovery/most-viewed-products-windowed"},{"title":"Most-added-to-cart products (windowed)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/discovery/most-added-to-cart","href":"/api-reference/discovery/most-added-to-cart-products-windowed"},{"title":"Best-converting products (windowed)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/discovery/best-converting","href":"/api-reference/discovery/best-converting-products-windowed"}]},{"group":"Events","pages":[{"title":"Record a storefront product event","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/events","href":"/api-reference/events/record-a-storefront-product-event"}]},{"group":"Tax","pages":[{"title":"Preview tax for a cart before checkout","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/tax/preview","href":"/api-reference/tax/preview-tax-for-a-cart-before-checkout"}]},{"group":"Analytics","pages":[{"title":"Record a storefront analytics event","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/analytics/collect","href":"/api-reference/analytics/record-a-storefront-analytics-event"}]},{"group":"Agent","pages":[{"title":"List the agent tools","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/capabilities","href":"/api-reference/agent/list-the-agent-tools"},{"title":"Search by constraints","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/search","href":"/api-reference/agent/search-by-constraints"},{"title":"Read a shopper's message","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/interpret","href":"/api-reference/agent/read-a-shoppers-message"},{"title":"Get a product dossier","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/products/{id}/context","href":"/api-reference/agent/get-a-product-dossier"},{"title":"Compare products","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/compare","href":"/api-reference/agent/compare-products"},{"title":"Check a product against constraints","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/fit","href":"/api-reference/agent/check-a-product-against-constraints"},{"title":"Find alternatives to a product","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/alternatives","href":"/api-reference/agent/find-alternatives-to-a-product"},{"title":"Price a basket","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/quote","href":"/api-reference/agent/price-a-basket"},{"title":"Create a cart draft","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/cart-drafts","href":"/api-reference/agent/create-a-cart-draft"},{"title":"Draft a cart from an intent","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/cart-drafts/from-intent","href":"/api-reference/agent/draft-a-cart-from-an-intent"},{"title":"Get a cart draft","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/cart-drafts/{id}","href":"/api-reference/agent/get-a-cart-draft"},{"title":"Add a draft to the shopper's cart","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/cart-drafts/{id}/apply","href":"/api-reference/agent/add-a-draft-to-the-shoppers-cart"},{"title":"Get insights on a cart","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/cart-insights","href":"/api-reference/agent/get-insights-on-a-cart"},{"title":"Get the shopper's personalisation consent","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/me/consent","href":"/api-reference/agent/get-the-shoppers-personalisation-consent"},{"title":"Grant or revoke personalisation consent","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/consent","href":"/api-reference/agent/grant-or-revoke-personalisation-consent"},{"title":"Get the shopper's own context","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/me/context","href":"/api-reference/agent/get-the-shoppers-own-context"},{"title":"Get wishlist insights","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/me/wishlist-insights","href":"/api-reference/agent/get-wishlist-insights"},{"title":"Get reorder suggestions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/me/reorder-suggestions","href":"/api-reference/agent/get-reorder-suggestions"},{"title":"Get an order's status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/orders/{id}/status","href":"/api-reference/agent/get-an-orders-status"},{"title":"Request a return for an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/orders/{id}/returns","href":"/api-reference/agent/request-a-return-for-an-order"},{"title":"List the shopper's standing instructions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/me/mandates","href":"/api-reference/agent/list-the-shoppers-standing-instructions"},{"title":"Create a standing instruction","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/mandates","href":"/api-reference/agent/create-a-standing-instruction"},{"title":"Cancel a standing instruction","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/mandates/{id}/cancel","href":"/api-reference/agent/cancel-a-standing-instruction"},{"title":"Subscribe \u0026 Save offers on a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/products/{id}/subscribe-save","href":"/api-reference/agent/subscribe-\u0026-save-offers-on-a-product"},{"title":"List the shopper's assistant conversations","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/me/conversations","href":"/api-reference/agent/list-the-shoppers-assistant-conversations"},{"title":"Start an assistant conversation","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/conversations","href":"/api-reference/agent/start-an-assistant-conversation"},{"title":"Delete all of the shopper's assistant conversations","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/agent/me/conversations","href":"/api-reference/agent/delete-all-of-the-shoppers-assistant-conversations"},{"title":"Move a guest's conversations to the shopper who signed in","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/conversations/adopt","href":"/api-reference/agent/move-a-guests-conversations-to-the-shopper-who-signed-in"},{"title":"Get an assistant conversation with its turns","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/me/conversations/{id}","href":"/api-reference/agent/get-an-assistant-conversation-with-its-turns"},{"title":"Delete an assistant conversation","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/agent/me/conversations/{id}","href":"/api-reference/agent/delete-an-assistant-conversation"},{"title":"Add a turn to an assistant conversation","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/conversations/{id}/turns","href":"/api-reference/agent/add-a-turn-to-an-assistant-conversation"},{"title":"List the shopper's Subscribe \u0026 Save subscriptions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/me/shopper-subscriptions","href":"/api-reference/agent/list-the-shoppers-subscribe-\u0026-save-subscriptions"},{"title":"Start a Subscribe \u0026 Save subscription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/shopper-subscriptions","href":"/api-reference/agent/start-a-subscribe-\u0026-save-subscription"},{"title":"Pause a Subscribe \u0026 Save subscription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/shopper-subscriptions/{id}/pause","href":"/api-reference/agent/pause-a-subscribe-\u0026-save-subscription"},{"title":"Skip the next Subscribe \u0026 Save delivery","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/shopper-subscriptions/{id}/skip","href":"/api-reference/agent/skip-the-next-subscribe-\u0026-save-delivery"},{"title":"Cancel a Subscribe \u0026 Save subscription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/shopper-subscriptions/{id}/cancel","href":"/api-reference/agent/cancel-a-subscribe-\u0026-save-subscription"},{"title":"Change a Subscribe \u0026 Save subscription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/me/shopper-subscriptions/{id}/update","href":"/api-reference/agent/change-a-subscribe-\u0026-save-subscription"},{"title":"Create a checkout intent","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/checkout-intents","href":"/api-reference/agent/create-a-checkout-intent"},{"title":"Get a checkout intent","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/checkout-intents/{id}","href":"/api-reference/agent/get-a-checkout-intent"},{"title":"Confirm a checkout intent","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/checkout-intents/{id}/confirm","href":"/api-reference/agent/confirm-a-checkout-intent"},{"title":"Cancel a checkout intent","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agent/checkout-intents/{id}/cancel","href":"/api-reference/agent/cancel-a-checkout-intent"},{"title":"Get the store's policies","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/store-policies","href":"/api-reference/agent/get-the-stores-policies"},{"title":"Get AI credit usage","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agent/usage","href":"/api-reference/agent/get-ai-credit-usage"}]},{"group":"Search","pages":[{"title":"Simple text search","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/search","href":"/api-reference/search/simple-text-search"},{"title":"Semantic search","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/search","href":"/api-reference/search/semantic-search"},{"title":"Type-ahead suggestions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/search/autocomplete","href":"/api-reference/search/type-ahead-suggestions"}]},{"group":"Authentication","pages":[{"title":"Register customer account","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/register","href":"/api-reference/authentication/register-customer-account"},{"title":"Confirm a new account","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/register/verify","href":"/api-reference/authentication/confirm-a-new-account"},{"title":"Resend the confirmation email","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/register/resend","href":"/api-reference/authentication/resend-the-confirmation-email"},{"title":"Create an account from a guest order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/claim-account","href":"/api-reference/authentication/create-an-account-from-a-guest-order"},{"title":"Login with email and password","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/login","href":"/api-reference/authentication/login-with-email-and-password"},{"title":"Logout current session","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/logout","href":"/api-reference/authentication/logout-current-session"},{"title":"Send a sign-in code","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/magic-link","href":"/api-reference/authentication/send-a-sign-in-code"},{"title":"Verify a sign-in code","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/verify-otp","href":"/api-reference/authentication/verify-a-sign-in-code"},{"title":"Request a password reset","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/password/forgot","href":"/api-reference/authentication/request-a-password-reset"},{"title":"Reset a password","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/password/reset","href":"/api-reference/authentication/reset-a-password"},{"title":"Change or set a password","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/password/change","href":"/api-reference/authentication/change-or-set-a-password"},{"title":"Refresh access token","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/auth/refresh","href":"/api-reference/authentication/refresh-access-token"},{"title":"Get current user","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/auth/me","href":"/api-reference/authentication/get-current-user"}]},{"group":"Customers","pages":[{"title":"Create customer","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers","href":"/api-reference/customers/create-customer"},{"title":"Get customer details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/customers/{id}","href":"/api-reference/customers/get-customer-details"},{"title":"Update customer","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/customers/{id}","href":"/api-reference/customers/update-customer"},{"title":"List a shopper's saved addresses","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/customers/{id}/addresses","href":"/api-reference/customers/list-a-shoppers-saved-addresses"},{"title":"Save a new address","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers/{id}/addresses","href":"/api-reference/customers/save-a-new-address"},{"title":"Delete a saved address","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/customers/{id}/addresses/{addressId}","href":"/api-reference/customers/delete-a-saved-address"},{"title":"Update a saved address","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/customers/{id}/addresses/{addressId}","href":"/api-reference/customers/update-a-saved-address"},{"title":"List a shopper's Subscribe \u0026 Save subscriptions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/customers/{id}/shopper-subscriptions","href":"/api-reference/customers/list-a-shoppers-subscribe-\u0026-save-subscriptions"},{"title":"Get a Subscribe \u0026 Save subscription","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/customers/{id}/shopper-subscriptions/{subscriptionId}","href":"/api-reference/customers/get-a-subscribe-\u0026-save-subscription"},{"title":"Change a Subscribe \u0026 Save subscription","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/customers/{id}/shopper-subscriptions/{subscriptionId}","href":"/api-reference/customers/change-a-subscribe-\u0026-save-subscription"},{"title":"Pause a Subscribe \u0026 Save subscription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers/{id}/shopper-subscriptions/{subscriptionId}/pause","href":"/api-reference/customers/pause-a-subscribe-\u0026-save-subscription"},{"title":"Resume a paused Subscribe \u0026 Save subscription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers/{id}/shopper-subscriptions/{subscriptionId}/resume","href":"/api-reference/customers/resume-a-paused-subscribe-\u0026-save-subscription"},{"title":"Skip the next Subscribe \u0026 Save delivery","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers/{id}/shopper-subscriptions/{subscriptionId}/skip-next","href":"/api-reference/customers/skip-the-next-subscribe-\u0026-save-delivery"},{"title":"Cancel a Subscribe \u0026 Save subscription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers/{id}/shopper-subscriptions/{subscriptionId}/cancel","href":"/api-reference/customers/cancel-a-subscribe-\u0026-save-subscription"},{"title":"Add a card to a Subscribe \u0026 Save subscription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers/{id}/shopper-subscriptions/{subscriptionId}/payment-method","href":"/api-reference/customers/add-a-card-to-a-subscribe-\u0026-save-subscription"},{"title":"List a shopper's saved cards","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/customers/{id}/payment-methods","href":"/api-reference/customers/list-a-shoppers-saved-cards"},{"title":"Remove a saved card","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/customers/{id}/payment-methods/{paymentMethodId}","href":"/api-reference/customers/remove-a-saved-card"},{"title":"List a shopper's data requests","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/customers/{id}/data-requests","href":"/api-reference/customers/list-a-shoppers-data-requests"},{"title":"Ask for a copy of my data, or for my account to be deleted","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers/{id}/data-requests","href":"/api-reference/customers/ask-for-a-copy-of-my-data-or-for-my-account-to-be-deleted"},{"title":"Download a copy of my data","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/customers/{id}/data-requests/{request_id}/export","href":"/api-reference/customers/download-a-copy-of-my-data"},{"title":"Start changing a shopper's email address","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers/{id}/email-change","href":"/api-reference/customers/start-changing-a-shoppers-email-address"},{"title":"Confirm a shopper's new email address","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers/{id}/email-change/confirm","href":"/api-reference/customers/confirm-a-shoppers-new-email-address"},{"title":"List a shopper's delivered items","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/customers/{id}/fulfilments","href":"/api-reference/customers/list-a-shoppers-delivered-items"},{"title":"Reveal the codes of a delivered item","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/customers/{id}/fulfilments/{fulfilment_id}/reveal","href":"/api-reference/customers/reveal-the-codes-of-a-delivered-item"},{"title":"Download a file the shopper bought","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/fulfilment/downloads/{fulfilment_id}/{asset_id}","href":"/api-reference/customers/download-a-file-the-shopper-bought"}]},{"group":"Gift Cards","pages":[{"title":"List gift cards","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/gift-cards","href":"/api-reference/gift-cards/list-gift-cards"},{"title":"Check gift card balance","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/gift-cards/check","href":"/api-reference/gift-cards/check-gift-card-balance"}]},{"group":"Promotions","pages":[{"title":"List promotions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/promotions","href":"/api-reference/promotions/list-promotions"},{"title":"Get promotion details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/promotions/{id}","href":"/api-reference/promotions/get-promotion-details"},{"title":"Calculate a promotion's discount for a cart","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/promotions/{id}/calculate","href":"/api-reference/promotions/calculate-a-promotions-discount-for-a-cart"},{"title":"Find the best promotion for a cart","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/promotions/calculate-best","href":"/api-reference/promotions/find-the-best-promotion-for-a-cart"},{"title":"List the Subscribe \u0026 Save offers for a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/subscribe-save/offers","href":"/api-reference/promotions/list-the-subscribe-\u0026-save-offers-for-a-product"},{"title":"Quote the price of a Subscribe \u0026 Save offer","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/subscribe-save/quote","href":"/api-reference/promotions/quote-the-price-of-a-subscribe-\u0026-save-offer"}]},{"group":"Campaigns","pages":[{"title":"List running campaigns","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/campaigns","href":"/api-reference/campaigns/list-running-campaigns"},{"title":"Get a running campaign","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/campaigns/{id}","href":"/api-reference/campaigns/get-a-running-campaign"}]},{"group":"CMS","pages":[{"title":"List blog posts","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/posts","href":"/api-reference/cms/list-blog-posts"},{"title":"Get blog post by slug","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/posts/{slug}","href":"/api-reference/cms/get-blog-post-by-slug"},{"title":"Most-read blog posts","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/posts/trending","href":"/api-reference/cms/most-read-blog-posts"},{"title":"Posts related to this one","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/posts/{slug}/related","href":"/api-reference/cms/posts-related-to-this-one"},{"title":"List lookbooks","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/lookbooks","href":"/api-reference/cms/list-lookbooks"},{"title":"Get lookbook details by slug","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/lookbooks/{slug}","href":"/api-reference/cms/get-lookbook-details-by-slug"},{"title":"Subscribe an email to the store's newsletter","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/newsletter/subscribe","href":"/api-reference/cms/subscribe-an-email-to-the-stores-newsletter"},{"title":"Get a lead form","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/lead-forms/{slug}","href":"/api-reference/cms/get-a-lead-form"},{"title":"Get a lead form token","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/lead-forms/{slug}/token","href":"/api-reference/cms/get-a-lead-form-token"},{"title":"Submit a lead form","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/lead-forms/{slug}/submit","href":"/api-reference/cms/submit-a-lead-form"}]},{"group":"Pricing","pages":[{"title":"Get prices for multiple products with dynamic pricing and multi-currency support","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/prices/products","href":"/api-reference/pricing/get-prices-for-multiple-products-with-dynamic-pricing-and-multi-currency-support"},{"title":"Get single product pricing with dynamic pricing and multi-currency support","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/prices/products/{id}","href":"/api-reference/pricing/get-single-product-pricing-with-dynamic-pricing-and-multi-currency-support"},{"title":"Get product pricing by SEO-friendly slug with dynamic pricing and multi-currency support","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/prices/products/by-slug/{slug}","href":"/api-reference/pricing/get-product-pricing-by-seo-friendly-slug-with-dynamic-pricing-and-multi-currency-support"}]},{"group":"Messaging","pages":[{"title":"List message threads","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/messaging/threads","href":"/api-reference/messaging/list-message-threads"},{"title":"Get thread details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/messaging/threads/{id}","href":"/api-reference/messaging/get-thread-details"},{"title":"Update thread","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/messaging/threads/{id}","href":"/api-reference/messaging/update-thread"},{"title":"Get messages in a thread","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/messaging/threads/{id}/messages","href":"/api-reference/messaging/get-messages-in-a-thread"},{"title":"Send a message to a thread","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/messaging/threads/{id}/messages","href":"/api-reference/messaging/send-a-message-to-a-thread"},{"title":"Start a new conversation","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/messaging/conversations","href":"/api-reference/messaging/start-a-new-conversation"},{"title":"Mark thread as read","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/messaging/threads/{id}/read","href":"/api-reference/messaging/mark-thread-as-read"},{"title":"Delete message","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/messaging/messages/{id}","href":"/api-reference/messaging/delete-message"},{"title":"Edit message","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/messaging/messages/{id}","href":"/api-reference/messaging/edit-message"},{"title":"Subscribe to a thread's new messages in realtime (WebSocket)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/messaging/threads/{id}/subscribe","href":"/api-reference/messaging/subscribe-to-a-threads-new-messages-in-realtime-websocket"},{"title":"Read a guest conversation from its email link","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/messaging/guest-thread/view","href":"/api-reference/messaging/read-a-guest-conversation-from-its-email-link"},{"title":"Reply on a guest conversation from its email link","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/messaging/guest-thread/reply","href":"/api-reference/messaging/reply-on-a-guest-conversation-from-its-email-link"},{"title":"Report a marketplace guest conversation from its email link","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/messaging/guest-thread/report","href":"/api-reference/messaging/report-a-marketplace-guest-conversation-from-its-email-link"},{"title":"Report a marketplace conversation","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/messaging/threads/{id}/report","href":"/api-reference/messaging/report-a-marketplace-conversation"}]},{"group":"Shipping","pages":[{"title":"Get shipping zones and pricing tiers","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/shipping/zones","href":"/api-reference/shipping/get-shipping-zones-and-pricing-tiers"},{"title":"Calculate shipping fee","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/shipping/calculate","href":"/api-reference/shipping/calculate-shipping-fee"},{"title":"Track a shipment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/shipping/tracking/{carrier}/{number}","href":"/api-reference/shipping/track-a-shipment"}]},{"group":"GC Connect","pages":[{"title":"Validate an authorization request","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/connect/authorize","href":"/api-reference/gc-connect/validate-an-authorization-request"},{"title":"Approve the authorization (merchant consent)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/connect/authorize","href":"/api-reference/gc-connect/approve-the-authorization-merchant-consent"},{"title":"Exchange authorization code for API keys","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/connect/token","href":"/api-reference/gc-connect/exchange-authorization-code-for-api-keys"},{"title":"Revoke a store connection","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/connect/revoke","href":"/api-reference/gc-connect/revoke-a-store-connection"},{"title":"List active store connections","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/connect/sessions","href":"/api-reference/gc-connect/list-active-store-connections"},{"title":"List the linked store's team","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/connect/team","href":"/api-reference/gc-connect/list-the-linked-stores-team"}]},{"group":"Storefront Studio","pages":[{"title":"Read the reported storefront address and routes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/storefront/site","href":"/api-reference/storefront-studio/read-the-reported-storefront-address-and-routes"},{"title":"Report the storefront's address and routes","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/storefront/site","href":"/api-reference/storefront-studio/report-the-storefronts-address-and-routes"},{"title":"List the app's A/B experiments","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/storefront/experiments","href":"/api-reference/storefront-studio/list-the-apps-ab-experiments"},{"title":"Register or update an A/B experiment","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/storefront/experiments/{experiment_id}","href":"/api-reference/storefront-studio/register-or-update-an-ab-experiment"},{"title":"Read the paid orders for each variant of an experiment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/storefront/experiments/{experiment_id}/conversions","href":"/api-reference/storefront-studio/read-the-paid-orders-for-each-variant-of-an-experiment"},{"title":"List the support requests the app opened","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/storefront/tickets","href":"/api-reference/storefront-studio/list-the-support-requests-the-app-opened"},{"title":"Open a support request for the store","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/storefront/tickets","href":"/api-reference/storefront-studio/open-a-support-request-for-the-store"},{"title":"Read one support request the app opened","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/storefront/tickets/{ticket_id}","href":"/api-reference/storefront-studio/read-one-support-request-the-app-opened"},{"title":"List the templates the app offered","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/storefront/templates","href":"/api-reference/storefront-studio/list-the-templates-the-app-offered"},{"title":"Read a template the app offered","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/storefront/templates/{template_id}","href":"/api-reference/storefront-studio/read-a-template-the-app-offered"},{"title":"Offer a template for the store","deprecated":null,"version":null,"openapi":"/openapi.yaml put /v1/storefront/templates/{template_id}","href":"/api-reference/storefront-studio/offer-a-template-for-the-store"},{"title":"Withdraw a template offer","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/storefront/templates/{template_id}","href":"/api-reference/storefront-studio/withdraw-a-template-offer"}]},{"group":"Reviews","pages":[{"title":"List reviews for a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/reviews","href":"/api-reference/reviews/list-reviews-for-a-product"},{"title":"Submit a product review","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/reviews","href":"/api-reference/reviews/submit-a-product-review"},{"title":"Get a single review","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/reviews/{id}","href":"/api-reference/reviews/get-a-single-review"},{"title":"Delete your own review","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/reviews/{id}","href":"/api-reference/reviews/delete-your-own-review"},{"title":"Mark a review as helpful","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/reviews/{id}/helpful","href":"/api-reference/reviews/mark-a-review-as-helpful"}]},{"group":"Returns","pages":[{"title":"List return reason codes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/returns/reasons","href":"/api-reference/returns/list-return-reason-codes"},{"title":"Check whether an order can still be returned","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/returns/eligibility","href":"/api-reference/returns/check-whether-an-order-can-still-be-returned"},{"title":"Get the customer's store credit balance","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/returns/store-credit","href":"/api-reference/returns/get-the-customers-store-credit-balance"},{"title":"List the signed-in customer's returns","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/returns","href":"/api-reference/returns/list-the-signed-in-customers-returns"},{"title":"Lodge a return","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/returns","href":"/api-reference/returns/lodge-a-return"},{"title":"Get one of the customer's returns","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/returns/{id}","href":"/api-reference/returns/get-one-of-the-customers-returns"},{"title":"Accept a store credit offer","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/returns/{id}/accept-credit","href":"/api-reference/returns/accept-a-store-credit-offer"},{"title":"Request a refund instead of store credit","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/returns/{id}/request-refund","href":"/api-reference/returns/request-a-refund-instead-of-store-credit"}]},{"group":"Disputes","pages":[{"title":"List dispute reason codes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/disputes/reasons","href":"/api-reference/disputes/list-dispute-reason-codes"},{"title":"List the shopper's disputes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/disputes","href":"/api-reference/disputes/list-the-shoppers-disputes"},{"title":"Open a dispute","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/disputes","href":"/api-reference/disputes/open-a-dispute"},{"title":"Get a dispute","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/disputes/{id}","href":"/api-reference/disputes/get-a-dispute"},{"title":"Cancel a dispute","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/disputes/{id}/cancel","href":"/api-reference/disputes/cancel-a-dispute"},{"title":"Add a message to a dispute","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/disputes/{id}/messages","href":"/api-reference/disputes/add-a-message-to-a-dispute"}]},{"group":"B2B","pages":[{"title":"List your requests for quote","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/b2b/rfqs","href":"/api-reference/b2b/list-your-requests-for-quote"},{"title":"Request a quote","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/b2b/rfqs","href":"/api-reference/b2b/request-a-quote"},{"title":"Get one of your RFQs","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/b2b/rfqs/{id}","href":"/api-reference/b2b/get-one-of-your-rfqs"},{"title":"Get a quote addressed to you","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/b2b/quotes/{id}","href":"/api-reference/b2b/get-a-quote-addressed-to-you"},{"title":"Accept a quote","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/b2b/quotes/{id}/accept","href":"/api-reference/b2b/accept-a-quote"},{"title":"Reject a quote","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/b2b/quotes/{id}/reject","href":"/api-reference/b2b/reject-a-quote"},{"title":"List your purchase orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/b2b/purchase-orders","href":"/api-reference/b2b/list-your-purchase-orders"},{"title":"Get one of your purchase orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/b2b/purchase-orders/{id}","href":"/api-reference/b2b/get-one-of-your-purchase-orders"},{"title":"List your invoices","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/b2b/invoices","href":"/api-reference/b2b/list-your-invoices"},{"title":"Get one of your invoices","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/b2b/invoices/{id}","href":"/api-reference/b2b/get-one-of-your-invoices"},{"title":"Start paying an invoice","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/b2b/invoices/{id}/pay","href":"/api-reference/b2b/start-paying-an-invoice"},{"title":"List the approvals the signed-in approver can decide","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/b2b/approvals","href":"/api-reference/b2b/list-the-approvals-the-signed-in-approver-can-decide"},{"title":"Approve or reject a held purchase","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/b2b/approvals/{id}/decision","href":"/api-reference/b2b/approve-or-reject-a-held-purchase"},{"title":"Place a wholesale order directly (self-serve checkout)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/b2b/orders","href":"/api-reference/b2b/place-a-wholesale-order-directly-self-serve-checkout"}]},{"group":"Webhooks","pages":[{"title":"List webhook endpoints","deprecated":null,"version":null,"openapi":"/tldp/openapi.yaml get /v1/webhooks","href":"/api-reference/webhooks/list-webhook-endpoints"},{"title":"Create a webhook endpoint","deprecated":null,"version":null,"openapi":"/tldp/openapi.yaml post /v1/webhooks","href":"/api-reference/webhooks/create-a-webhook-endpoint"},{"title":"Get a webhook endpoint","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/webhook_endpoints/{id}","href":"/api-reference/webhooks/get-a-webhook-endpoint"},{"title":"Delete a webhook endpoint","deprecated":null,"version":null,"openapi":"/tldp/openapi.yaml delete /v1/webhooks/{webhookId}","href":"/api-reference/webhooks/delete-a-webhook-endpoint"},{"title":"Update a webhook endpoint","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /v1/webhook_endpoints/{id}","href":"/api-reference/webhooks/update-a-webhook-endpoint"},{"title":"Send a test event","deprecated":null,"version":null,"openapi":"/tldp/openapi.yaml post /v1/webhooks/{webhookId}/test","href":"/api-reference/webhooks/send-a-test-event"},{"title":"List webhook events","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/webhook_events","href":"/api-reference/webhooks/list-webhook-events"},{"title":"Get a webhook event","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/webhook_events/{id}","href":"/api-reference/webhooks/get-a-webhook-event"},{"title":"Retry a webhook event","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/webhook_events/{id}/retry","href":"/api-reference/webhooks/retry-a-webhook-event"}]},{"group":"Ingestion","pages":[{"title":"Ingest a batch of products","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/ingest/products","href":"/api-reference/ingestion/ingest-a-batch-of-products"},{"title":"Get a sample product feed","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/ingest/sample","href":"/api-reference/ingestion/get-a-sample-product-feed"},{"title":"Validate a product feed (no writes)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/ingest/test","href":"/api-reference/ingestion/validate-a-product-feed-no-writes"}]},{"group":"Feeds","pages":[{"title":"Public catalog feed (JSON)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/feeds/{store}/products.json","href":"/api-reference/feeds/public-catalog-feed-json"},{"title":"Public catalog feed (XML)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/feeds/{store}/products.xml","href":"/api-reference/feeds/public-catalog-feed-xml"},{"title":"Store summary for AI assistants (llms.txt)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/feeds/{store}/llms.txt","href":"/api-reference/feeds/store-summary-for-ai-assistants-llmstxt"},{"title":"Full catalog for AI assistants (llms-full.txt)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/feeds/{store}/llms-full.txt","href":"/api-reference/feeds/full-catalog-for-ai-assistants-llms-fulltxt"},{"title":"How an AI assistant connects to a store (agent.json)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/feeds/{store}/agent.json","href":"/api-reference/feeds/how-an-ai-assistant-connects-to-a-store-agentjson"}]},{"group":"Sandbox","pages":[{"title":"Reset your sandbox data","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sandbox/reset","href":"/api-reference/sandbox/reset-your-sandbox-data"},{"title":"Reset your sandbox data (alias)","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/sandbox/data","href":"/api-reference/sandbox/reset-your-sandbox-data-alias"},{"title":"Fast-forward sandbox time","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sandbox/time","href":"/api-reference/sandbox/fast-forward-sandbox-time"},{"title":"Replay a sandbox webhook event","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sandbox/webhooks/replay","href":"/api-reference/sandbox/replay-a-sandbox-webhook-event"},{"title":"Create a sandbox promotion","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sandbox/seed/promotion","href":"/api-reference/sandbox/create-a-sandbox-promotion"},{"title":"Create a sandbox gift card","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sandbox/seed/gift-card","href":"/api-reference/sandbox/create-a-sandbox-gift-card"},{"title":"Create a sandbox campaign","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sandbox/seed/campaign","href":"/api-reference/sandbox/create-a-sandbox-campaign"},{"title":"Create a sandbox B2B buyer account","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sandbox/seed/b2b-buyer-account","href":"/api-reference/sandbox/create-a-sandbox-b2b-buyer-account"},{"title":"Create a sandbox dynamic-pricing rule","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sandbox/seed/pricing-rule","href":"/api-reference/sandbox/create-a-sandbox-dynamic-pricing-rule"},{"title":"List sandbox stock levels","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/sandbox/stock","href":"/api-reference/sandbox/list-sandbox-stock-levels"},{"title":"Set sandbox stock levels","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/sandbox/stock","href":"/api-reference/sandbox/set-sandbox-stock-levels"},{"title":"Remove every sandbox stock level","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/sandbox/stock","href":"/api-reference/sandbox/remove-every-sandbox-stock-level"},{"title":"Remove one sandbox stock level","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /v1/sandbox/stock/{variant_id}","href":"/api-reference/sandbox/remove-one-sandbox-stock-level"}]},{"group":"Agency Signup","pages":[{"title":"Get an agency's plans and its active automatic offers","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/agency/pricing","href":"/api-reference/agency-signup/get-an-agencys-plans-and-its-active-automatic-offers"},{"title":"Get the platform's active automatic offers","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/pricing/offers","href":"/api-reference/agency-signup/get-the-platforms-active-automatic-offers"},{"title":"Sign a merchant up under an agency (send code, verify, create the store)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/agency/merchant-signup","href":"/api-reference/agency-signup/sign-a-merchant-up-under-an-agency-send-code-verify-create-the-store"}]}]},{"tab":"TypeScript SDK","pages":[{"title":"TypeScript SDK","href":"/sdk/introduction"}]},{"tab":"Workflow Examples","pages":[{"title":"Workflow Examples","href":"/workflows/introduction"}]}]},{"product":"TLDP","icon":"truck","description":"One API for logistics: rates, shipments, tracking and returns","pages":[{"title":"TLDP","href":"/tldp"}]}]},"basePath":"","title":"Create order - Galactic Core API Documentation","deploymentId":"dpl_5nNsUVHqbVdUHouroPPzwztSbjmH","buildId":"dpl_5nNsUVHqbVdUHouroPPzwztSbjmH","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-B564ZPEC.js","snippetPresets-L1o8HcxD.js","utils-CztB6GTn.js","style-to-object-BY3JEAdk.js","utils-CvVTgJWk.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-DYi6_847.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DthbVJn_.js","_Uint8Array-G4MDMcnE.js","isObject-FP1Yky1u.js","Page-Cwg6gQ2F.js","api-description-markdown-DFvICuUq.js","DynamicMarkdown-DHV3eOcf.js","CodeSnippet-DANVAYTI.js","use-playground-group-access-DaUWE1Sg.js","SectionHeading-DLRZDaDn.js","ApiExamples-BnQo4SxZ.js","usePlaygroundInputsStore-Dsmj0Yg6.js","shallow-Bp_wEvgz.js","isEqual-BwXlkqOR.js","CodeSnippets-D6Fi8DmN.js","MethodPill-CgqQYk5N.js","getPastedJson-k_txzq3J.js","Check2Icon-CO8ho5Tt.js","axios-CsQoIw0U.js","Markdown-C8ZpmBko.js","AssistantPageLink-AWAGfbYY.js","dist-CAcI43Vk.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}