Agentic

Create quote

POSThttps://api.firstleeward.com/v0/agentic/quotes

Opens 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 · headerrequired

API key as Bearer token, e.g. Bearer YOUR_API_KEY

Headers

Leeward-Versionenum<string>required

API version (YYYY-MM-DD). Available option: 2026-09-18

Idempotency-Keystringrequired

Unique 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>required
offerCodestring

Offer code to apply while pricing the quote

itemsobject[]required
Show child attributes
variantIdstringrequired
quantityintegerrequired
shippingAddressobject
Show child attributes
firstNamestringrequired
lastNamestringrequired
phonestringrequired
addressLine1stringrequired
addressLine2string
citystringrequired
regionstring
postalCodestring
countrystringrequired
Option 2 · Checkout URL
emailstring<email>required
offerCodestring

Offer code to apply while pricing the quote

externalCheckoutobjectrequired
Show child attributes
merchantDomainstringrequired
checkoutUrlstring<uri>required

Caller-assembled checkout URL, preserved without rebuilding. Its host must be merchantDomain or a subdomain of it.

shippingAddressobjectrequired
Show child attributes
firstNamestringrequired
lastNamestringrequired
phonestringrequired
addressLine1stringrequired
addressLine2string
citystringrequired
regionstring
postalCodestring
countrystringrequired

Response

200Response for status 200
idstringrequired
shippingOptionsobject[]required
Show child attributes
idstringrequired
namestringrequired
selectedbooleanrequired
priceobjectrequired
Show child attributes
amountnumberrequired
currencystringrequired
detailsobject[]
Show child attributes
keystringrequired
valuestringrequired
amountBreakdownobjectrequired
Show child attributes
itemsSubtotalobjectrequired
Show child attributes
amountnumberrequired
currencystringrequired
shippingobject
Show child attributes
amountnumberrequired
currencystringrequired
taxobject
Show child attributes
amountobjectrequired
Show child attributes
amountnumberrequired
currencystringrequired
includedInPricesboolean
discountsobject[]required
Show child attributes
namestringrequired
amountobjectrequired
Show child attributes
amountnumberrequired
currencystringrequired
additionalChargesobject[]required
Show child attributes
namestringrequired
amountobjectrequired
Show child attributes
amountnumberrequired
currencystringrequired
finalAmountobjectrequired
Show child attributes
amountnumberrequired
currencystringrequired
expiresAtobjectrequired
400Response for status 400
Option 1 · AgenticRequestRejectedError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailnullrequired
Option 2 · CheckoutUrlInvalidError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Show child attributes
reasonstringrequired
Available options:NOT_FOUNDEXPIREDINVALIDMERCHANT_CONTEXT_UNVERIFIED
Option 3 · CardPaymentUnavailableError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailnullrequired
Option 4 · OfferCodeInvalidError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailnullrequired
Option 5 · OfferCodeExpiredError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailnullrequired
Option 6 · QuoteUnfulfillableError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Show child attributes
Option 1
reasonstringrequired
messagestring
Option 2
reasonstringrequired
messagestring
Option 3
reasonstringrequired
messagestring
Option 4
reasonstringrequired
messagestring
Option 7 · QuoteRequestRejectedError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Show child attributes
errorsobject[]required
Show child attributes
fieldstringrequired

Dot-separated path to the rejected request field; array indices are numeric segments, such as items.0.variantId

messagestring
Available options:Host 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 required
404Resource not found
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
409Response for status 409
Option 1 · QuoteExpiredError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailnullrequired
Option 2 · VariantUnavailableError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailnullrequired
503Response for status 503
Option 1 · AgenticServiceUnavailableError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Option 2 · QuoteTemporarilyUnavailableError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailnullrequired