Gett Developer Portal
  • Welcome
  • Distribution Partners
  • Brand Partners
  • Commerce Partners
  • Ecosystem Partners
  • Errors
  • API Reference
Documentation
  • Get Started
  • Marketfront SDK
  • API Reference
Resources
  • Payments
Company
  • Gett
  • Terms of Service
  • Privacy Policy

Copyright 2026 Gett. All rights reserved.

Marketfront SDK
Marketfront API
    Getting StartedConventionsOrder LifecycleCatalogSet
    API Reference
Marketfront AI
Shared Guides
powered by Zuplo
Marketfront API

API Conventions

This section covers the core mechanics of the Marketfront API, including error handling, rate limiting, and caching.

Authentication

All requests require a Bearer token in the Authorization header. See the Authentication guide for key management, environment setup, and security best practices.

Money & amounts

Every monetary value is a self-describing money object: the amounts breakdown carries a currency (ISO 4217, e.g. USD) and each amount is a decimal string — "10.50", never a bare JSON number.

Code
{ "amounts": { "currency": "USD", "subTotal": "18.00", "fees": "2.99", "taxes": "1.71", "tip": "3.00", "total": "25.70" } }

Send amounts the same way you receive them — as strings (e.g. amounts.tip on validateOrder).

Why strings? Parsing money as a JSON number invites IEEE-754 drift (0.1 + 0.2 !== 0.3). A decimal string parsed with a decimal/big-decimal type on your side is exact. Currency is explicit so you never have to assume USD.

Schema inheritance

Some schemas in the API reference render as allOf: [{$ref: Base}, {additional properties}]. Read this as inheritance — the object has all the fields from the referenced base schema, plus the additional ones listed. For example, DeliveryFulfillment extends Fulfillment (adding address, deliveryType, instructions), and OrderPlaceRequest extends OrderValidateRequest (adding payment).

This is why a field can appear once and apply everywhere. The required client object is declared on OrderCore, so both validateOrder and placeOrder carry it — see End-user client context.

Decimal places per currency

An amount must not carry more decimal places than its currency's minor unit, or the request is rejected with 422 PRECISION_EXCEEDED. Round to the currency's scale before sending.

Minor-unit scaleExample currenciesExample
2 (default)USD, EUR, GBP, CAD, AUD"10.50"
0JPY, KRW, VND, CLP"1000"
3BHD, KWD, OMR, TND"10.500"

Error Handling

All error responses use RFC 9457 application/problem+json format. Every error includes machine-readable fields (errorCategory, retryable, retryAfter) for programmatic handling. Domain-specific errors include an errorCode field identifying the specific issue.

The API supports content negotiation via the Accept header — request text/markdown for a compact text representation suitable for AI agents and CLI tooling. See the Error Reference for full details.

HTTP Status Codes

StatusMeaning
400Invalid request body, missing fields, or domain-specific errors (see errorCode)
401Missing or invalid API key
404Resource does not exist
409Cart or store conflict — CART_STALE, STORE_PAUSED, ENVIRONMENT_MISMATCH
422Request-shape or semantic validation of the request body failed (e.g. malformed body, PRECISION_EXCEEDED)
429Rate limit exceeded
500Unexpected server error

Order/business validation is different

validateOrder never returns a 4xx for business or order problems (item unavailable, store closed, minimum not met, etc.). It returns HTTP 200 with isValid: false and a populated errors[] on the Order body. Request-shape, authentication, and cart/store conflict errors still produce 4xx from that endpoint — a stale cart, a paused store, an environment mismatch (409) or an over-precise amount (422) are raised before the order is ever built, so handle both shapes. See Validation vs Placement in the Order Lifecycle guide.

Error Codes

Domain-specific errors include an errorCode field.

Two kinds of code appear below

The tables in this section list both:

  • Top-level ProblemDetail.errorCode — names an overall 4xx failure and carries an HTTP status, an errorCategory and a retryable flag.
  • errors[].code — a per-element reason on an order. These arrive on an HTTP 200 response with isValid: false and have no status, category or retryable of their own.

The Kind column on each table below says which one a code is. The authoritative list of errors[].code reasons is the Order Lifecycle guide.

Cart & Item Errors

CodeKindDescriptionAction
CATALOGSET_REQUIREDerrorCode 400Cart creation requires a catalogSetIdInclude catalogSetId when cart is null
ITEM_UNAVAILABLEerrors[].codeItem no longer availableRemove from cart and re-validate
MINIMUM_NOT_METerrors[].codeThe whole order is below the store's order minimumAdd more items
MODIFIER_REQUIREDerrors[].codeOne item is missing a required choiceResolve pointer to that line item and have the user pick the option

Store Errors

CodeKindDescriptionAction
STORE_CLOSEDerrors[].codeStore is not accepting orders right nowRe-discover stores
OUTSIDE_AVAILABILITY_WINDOWerrors[].codeRequested scheduled time is outside the store's hoursAdjust scheduledTime or switch to ASAP
DELIVERY_UNAVAILABLEerrors[].codeDelivery is not available for this orderOffer pickup or a different store
STORE_PAUSEDerrorCode 409Gett has paused this storeOffer another store, or retry after the pause lapses
STORE_NOT_FOUNDerrorCode 404Store does not existRe-discover stores
CATALOGSET_NOT_FOUNDerrorCode 404CatalogSet does not existRe-discover for updated catalogSetId

Payment Errors

CodeKindDescriptionAction
PAYMENT_FAILEDerrors[].codePayment declined without an attributable reasonAsk the user for a different payment method
PAYMENT_TOKEN_INVALIDerrorCode 400paymentToken is not usable for this orderRe-vault the card and quote the new token
CARD_EXPIREDbothCard has expired, or expired while storedCollect and vault a new card
INSUFFICIENT_FUNDSerrors[].codeDeclined — the account does not cover the amountAsk the user for a different payment method
INCORRECT_CVCerrors[].codeDeclined — the security code did not matchLet the user re-enter the security code and retry the same card
CARD_LOST_OR_STOLENerrors[].codeThe card cannot be usedAsk for a different method. Show a generic message — never tell a cardholder their card is flagged
PROCESSING_ERRORerrors[].codeA temporary fault at the processor, not a decision about the cardRetry the same card with a fresh idempotency key — see the page for the double-charge caveat
PAYMENT_DECLINEDerrorCode (reserved)Declined by issuer — not currently emittedUse a different payment method

Order Errors

CodeKindDescriptionAction
ORDER_TOTAL_DIFFERENTerrors[].codeTotal changed since validationRe-validate the order
OTHERerrors[].codeCatch-all, and the fallback for any unrecognized codeShow a generic error message
CART_STALEerrorCode 409The store's menu changed since the cart was builtStart a new cart from the current menu
ENVIRONMENT_MISMATCHerrorCode 409Store is not available for your account's environmentCheck sandbox vs live credentials
IDEMPOTENCY_KEY_CONFLICTerrorCode 422Idempotency-Key reused with a different request body, or by a different partner or end userUse a fresh key for a new order, or replay the same body as the same partner and end user
IDEMPOTENCY_KEY_IN_PROGRESSerrorCode 409An earlier request on this Idempotency-Key is still in flightRetry unchanged on the same key — a fresh key here places a duplicate order

Open enum: order errors[].code

The errors[].code values on an order are an open enum (x-extensible-enum). The reason codes listed above are current but not exhaustive — new codes may be added as new failure modes are identified. Clients must handle unknown values as OTHER and must not hard-fail on an unrecognized code. Do not deserialize into a closed/strict enum type. See the full code table with suggested actions in the Order Lifecycle guide.

This is distinct from the top-level ProblemDetail.errorCode field (a single string naming the overall failure reason on a 4xx place response).

Authentication Errors

CodeHTTPDescriptionAction
SESSION_USER_REQUIRED401Endpoint requires an authenticated user identityEnsure the end user is signed in before making this request

Retry Strategy

CategoryRetryable?Strategy
401 UnauthorizedNoFix your API key
400 Bad RequestNoFix the request
404 Not FoundNoResource doesn't exist
429 Too Many RequestsYesWait the number of seconds in Retry-After, then retry
500 Internal ErrorYesExponential backoff (1s, 2s, 4s, max 30s)

Always include the requestId when contacting support about a specific error.

Rate Limits

One limit: 1,000 requests per minute, per partner organization, shared across every endpoint.

There are no per-endpoint tiers. Reads, writes and store discovery all draw on the same counter, so 1,000 calls to /stores/discover and 1,000 calls to /orders/place in the same minute are 2,000 requests against one budget, not two budgets of 1,000.

Rate limits are scoped to your partner organization — all keys belonging to the same organization share the same quota. Sandbox and production draw on the same limit; there is no sandbox multiplier.

When you are limited

The API returns 429 Too Many Requests with a Retry-After header giving the number of seconds to wait. That is the only rate-limit header we send — there are no X-RateLimit-* headers, so do not build against a running remaining-count.

Wait for Retry-After seconds, then retry. If the header is absent, use exponential backoff starting at 1 second.

A 429 is shaped differently from our other errors

Rate limiting is enforced at the gateway, ahead of the API. A 429 is therefore generated by the gateway itself and does not carry the ProblemDetail envelope the rest of this page describes — no errorCode, no errorCategory, no retryAfter body field. Branch on the 429 status and the Retry-After header, not on the body.

Caching Strategy

Data TypeStrategyWhy
Store resultsNever cacheStore status changes constantly
CatalogSetsCache aggressivelyImmutable — use catalogSetId as cache key
Validation tokensExpire in 15 minSecurity and price accuracy
Getting StartedOrder Lifecycle
On this page
  • Authentication
  • Money & amounts
    • Schema inheritance
    • Decimal places per currency
  • Error Handling
    • HTTP Status Codes
    • Error Codes
    • Retry Strategy
  • Rate Limits
    • When you are limited
  • Caching Strategy
JSON