Agentic
Create quote
https://api.firstleeward.com/v0/agentic/quotesOpens and prices a merchant checkout from product variants or a checkout URL assembled by the client. Send exactly one of items and externalCheckout. Prices always come from the merchant. The response itemizes the total and lists the available shipping options. Quotes are short-lived: create the checkout before expiresAt passes, or open a fresh quote. shippingAddress is required for external checkout quotes and when any item requires shipping. Use offerCode to price an offer before approval. First Leeward makes one quote attempt and does not retry a failed merchant request. The error code states whether to correct the request or create a new quote.
Authorizations
Authorizationstring · headerrequiredAPI key as Bearer token, e.g. Bearer YOUR_API_KEY
Headers
Leeward-Versionenum<string>requiredAPI version (YYYY-MM-DD). Available option: 2026-09-18
Idempotency-KeystringrequiredUnique key for safely retrying this request. Up to 255 characters; we recommend a UUIDv4. The first request executes and its response is cached; subsequent requests with the same key replay the cached response (24h retention).
Body
application/json
Option 1 · First Leeward discovery
emailstring<email>requiredofferCodestringOffer code to apply while pricing the quote
itemsobject[]requiredShow child attributes
variantIdstringrequiredquantityintegerrequiredshippingAddressobjectShow child attributes
firstNamestringrequiredlastNamestringrequiredphonestringrequiredaddressLine1stringrequiredaddressLine2stringcitystringrequiredregionstringpostalCodestringcountrystringrequiredOption 2 · Checkout URL
emailstring<email>requiredofferCodestringOffer code to apply while pricing the quote
externalCheckoutobjectrequiredShow child attributes
merchantDomainstringrequiredcheckoutUrlstring<uri>requiredCaller-assembled checkout URL, preserved without rebuilding. Its host must be merchantDomain or a subdomain of it.
shippingAddressobjectrequiredShow child attributes
firstNamestringrequiredlastNamestringrequiredphonestringrequiredaddressLine1stringrequiredaddressLine2stringcitystringrequiredregionstringpostalCodestringcountrystringrequiredResponse
200Response for status 200
idstringrequiredshippingOptionsobject[]requiredShow child attributes
idstringrequirednamestringrequiredselectedbooleanrequiredpriceobjectrequiredShow child attributes
amountnumberrequiredcurrencystringrequireddetailsobject[]Show child attributes
keystringrequiredvaluestringrequiredamountBreakdownobjectrequiredShow child attributes
itemsSubtotalobjectrequiredShow child attributes
amountnumberrequiredcurrencystringrequiredshippingobjectShow child attributes
amountnumberrequiredcurrencystringrequiredtaxobjectShow child attributes
amountobjectrequiredShow child attributes
amountnumberrequiredcurrencystringrequiredincludedInPricesbooleandiscountsobject[]requiredShow child attributes
namestringrequiredamountobjectrequiredShow child attributes
amountnumberrequiredcurrencystringrequiredadditionalChargesobject[]requiredShow child attributes
namestringrequiredamountobjectrequiredShow child attributes
amountnumberrequiredcurrencystringrequiredfinalAmountobjectrequiredShow child attributes
amountnumberrequiredcurrencystringrequiredexpiresAtobjectrequired400Response for status 400
Option 1 · AgenticRequestRejectedError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailnullrequiredOption 2 · CheckoutUrlInvalidError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequiredShow child attributes
reasonstringrequiredNOT_FOUNDEXPIREDINVALIDMERCHANT_CONTEXT_UNVERIFIEDOption 3 · CardPaymentUnavailableError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailnullrequiredOption 4 · OfferCodeInvalidError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailnullrequiredOption 5 · OfferCodeExpiredError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailnullrequiredOption 6 · QuoteUnfulfillableError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequiredShow child attributes
Option 1
reasonstringrequiredmessagestringOption 2
reasonstringrequiredmessagestringOption 3
reasonstringrequiredmessagestringOption 4
reasonstringrequiredmessagestringOption 7 · QuoteRequestRejectedError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequiredShow child attributes
errorsobject[]requiredShow child attributes
fieldstringrequiredDot-separated path to the rejected request field; array indices are numeric segments, such as items.0.variantId
messagestringHost must match the merchant domainMust be a canonical DNS domain without a scheme, path, or wwwMust be a valid checkout URL of at most 8192 charactersMust be a valid checkout URLMust use HTTPSMust not include credentialsMust not include an explicit portMust be a Shopify cart permalink or tokenized checkout continuationshippingAddress is required for externalCheckoutOffer code must be at most 128 charactersExactly one of items or externalCheckout is required404Resource not found
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequired409Response for status 409
Option 1 · QuoteExpiredError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailnullrequiredOption 2 · VariantUnavailableError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailnullrequired503Response for status 503
Option 1 · AgenticServiceUnavailableError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequiredOption 2 · QuoteTemporarilyUnavailableError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailnullrequired