Skip to content

Delivery quotes

A delivery quote prices the delivery methods a checkout can offer, for the cart, destination, and pickup store as they are when you ask. It groups the cart's items into choice groups and lists the options the buyer can pick in each one. The buyer chooses by creating a delivery selection from the quote, and the checkout's payment uses that selection.

StepResourceUse it to
Before a checkout existsDelivery previewsShow estimated options on a product or cart page, or find pickup stores. Nothing is saved.
During checkoutDelivery quoteGet the options and prices the buyer can select for this checkout.
The buyer choosesDelivery selectionRecord one option per choice group, with its price and window.

Create a quote from the browser with the checkout credential, or from your server with an API key. Both get the same quote; the API key view adds what only a merchant needs. For the whole flow, from quoting the address to paying, follow Build your own checkout.

Create a quote#

Send the checkout in checkout_session_id. A quote never updates in place. Create a new one each time the buyer enters or corrects the destination, picks a pickup store, or changes the cart. Each change makes earlier quotes stale.

cURL
curl -X POST https://api.withflintpay.com/v1/delivery-quotes \
  -H "Authorization: Bearer ckat_1kmn0aExample" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: quote-cart-42-address-1" \
  -d '{
    "checkout_session_id": "cs_1kmn0aExample",
    "expected_delivery_selection_id": null,
    "destination_address": {
      "postal_code": "11249",
      "country": "US"
    }
  }'
JSON
{
  "data": {
    "delivery_quote_id": "dqt_1kmn0aExample",
    "status": "active",
    "evaluation_status": "complete",
    "selection_required": true,
    "choice_groups": [
      {
        "delivery_choice_group_id": "dcgrp_1kmn0aExample",
        "stable_key": "grp_1kmn0aExample",
        "availability_status": "ready",
        "evaluation_status": "complete",
        "method_types": ["shipment"],
        "line_items": [
          { "order_id": "ord_1kmn0aExample", "order_line_item_id": "li_1kmn0aExample", "quantity": 2 }
        ],
        "input_requirements": [],
        "options": [
          {
            "delivery_option_id": "dopt_1kmn0aExample",
            "delivery_method_id": "dmet_1kmn0aExample",
            "type": "shipment",
            "name": "Standard shipping",
            "amount_money": { "amount": 900, "currency": "USD" },
            "recommended": true,
            "display_position": 1,
            "taxable": true,
            "window_selection": "none",
            "buyer_instructions": { "enabled": false, "required": false },
            "delivery_plan": { "type": "single_delivery" },
            "expires_at": "2026-08-03T15:45:00Z"
          }
        ]
      }
    ],
    "input_requirements": [],
    "buyer_reasons": [],
    "delivery_revocation_id": null,
    "evaluated_at": "2026-08-03T15:30:00Z",
    "expires_at": "2026-08-03T15:45:00Z",
    "created_at": "2026-08-03T15:30:00Z"
  },
  "request_id": "req_1kmn0aExample"
}

Every request field is optional. Send what the buyer has given you so far:

FieldSend it for
destination_addressShipment and local delivery: where the items go. A partial address is fine.
buyer_locationPickup: where the buyer is, as an address or a coordinate, for methods that only serve buyers nearby.
pickup_location_idPickup: the store the buyer chose.
expected_delivery_selection_idAn assertion about the checkout's current selection.

expected_delivery_selection_id keeps a second browser tab from quoting over a newer choice. Send the session's delivery.delivery_selection_id, or null when no selection exists yet. Leave it out to make no assertion. A failed assertion returns 409 VERSION_CONFLICT; delivery selections explains the three cases.

Send an Idempotency-Key so a retried request returns the same quote. A request with a different body, such as a corrected address, needs a new key.

Partial addresses#

You can quote before the buyer finishes the address, for example from a postal code and country alone. A method whose zone or rate depends on a member you haven't sent, such as state, can't be decided yet: it has no option, and input_requirements names the member it needs. A selection needs a complete address, or it keeps the address its quote was priced from.

destination_address, and the address form of buyer_location, follow these rules:

  • country is required once you send any other member, and must be an uppercase ISO 3166-1 alpha-2 code.
  • Flint trims each member. A member that is empty after trimming is rejected.
  • line1 and line2 take up to 255 characters, city and state up to 100, and postal_code up to 20.

A broken rule returns 400 INVALID_REQUEST with param naming the member, such as destination_address.country.

Read a quote#

Render one picker for each entry in choice_groups. A group holds line items that are delivered together, and the options that can deliver them. The buyer picks one option from every group.

availability_statusWhat to show
readyThe group's options. The recommended option comes first, then the rest by display_position. Other methods in the group can still be waiting for input.
needs_inputA form for what the group's input_requirements asks for, such as the address. Quote again once the buyer enters it.
unavailableThat these items can't be delivered with what the buyer entered. buyer_reasons says why in terms the buyer can act on, such as outside_delivery_area.

buyer_reasons describes groups with no available option. A ready group contributes no reasons, even when an alternative method cannot serve the buyer.

When there is too little stock to route a pickup-only quote, Flint returns a quote that shows pickup as unavailable. With an API key, the affected candidate outcomes have reason inventory_unavailable. If Flint could only check stock for the cart as a whole, that reason can appear on multiple groups even when only one is short.

Three fields keep the checkout steady from one quote to the next:

  • method_types lists how a group can be delivered (shipment, pickup, or local_delivery) before any option is priced, so you can label the step "Delivery" or "Pickup" while you ask for the address.
  • stable_key stays the same across quotes while a group holds the same items and can be delivered the same ways. delivery_choice_group_id and every delivery_option_id are new in each quote, so key the picker's state on stable_key and select with the current quote's IDs.
  • previously_selected_delivery_method_id names the method the buyer chose in the current selection, so you can preselect it in the new quote.

When the buyer can select#

A selection can be created from a quote when all of these hold:

  • status is active or consumed.
  • Every choice group is ready.
  • No rates are still owed: with an API key, pending_caller_rate_requests is empty.

When selection_required is false, nothing in the cart needs delivery and there's nothing to select. An evaluation_status of incomplete or degraded doesn't block selection by itself: it means more input, or a retry, could add options.

Inputs the methods need#

input_requirements lists what the methods need, at the quote level and on each group. Each entry has a field_path, a typed constraint, and a purpose:

A field_path names the request property to fill in, using the same form as an error param. Buyer address fields use buyer_location.address.line1, line2, city, state, postal_code, or country. Array templates keep [], as in choices[].input.delivery_window_id.

For address inputs, constraint.supported_countries is a sorted array of ISO 3166-1 alpha-2 codes derived from method eligibility and rate-table conditions. It combines alternative methods within a choice group that need that address. A pickup method that needs no shipping address does not contribute shipping countries. Intersect the lists across groups to find countries that can receive the whole order. A listed country can still need a matching state, postal code, or other input. A rate-table row without when, or a method without eligibility and without a rate table, permits every supported delivery country. Callback pricing uses eligibility alone. Pickup buyer_location coverage comes from the eligible pickup locations' countries.

Supported delivery countries exclude CU, IR, KP, and SY, plus Crimea, Donetsk, and Luhansk when address data identifies the region. XK and CQ are not accepted ISO destination codes. For automatic-tax orders, quotes omit options whose item categories or taxable delivery charge are unsupported at the destination. Use order.tax.supported_countries to limit the country selector before quoting. Tax off and external tax do not narrow destination coverage.

purposeNeeded beforeExample
quoteFlint can price the method. Send it in the next quote.destination_address, or destination_address.postal_code
selectionThe buyer can pay with the selection. Send it with the selection.recipient.phone for a courier, a delivery window, or destination_address.line1 when a shipment was quoted from a partial address
pickup_availabilityFlint can check which stores have the items.The buyer's location for a store search

A method waiting on the buyer's address or store already lists the recipient fields it requires, with purpose selection. Those requirements name the method's choice group but no delivery_option_ids, because the method has no option yet. Ask for these fields along with the address: an Apple Pay or Google Pay sheet can only ask for a phone number when it opens.

A shipment or local delivery option quoted from a partial address lists each member a complete address still lacks, such as destination_address.line1, with purpose selection. You can select from the quote without them, but the buyer can't pay until a selection sends the complete address.

Prices for methods waiting on input#

With an API key, a group's candidate_outcomes[delivery_method_id] of type input_required can include expected_amount_money (Money, optional): the delivery charge this method will quote once its input_requirements are met, when the charge does not depend on them. Flint omits it when the amount is unknown.

Only fixed pricing reports this field, using the current order's currency. Shipment and local delivery candidates report their own fixed price. An input_required pickup candidate reports it only when every pickup method that could serve its choice group has fixed pricing with the same amount. If those methods charge different amounts, include a non-fixed method, or cannot establish the same fixed amount, none of the group's pickup candidates reports it. A method that is conclusively unavailable does not participate in this comparison.

For example, when pickup is free at both stores, each waiting pickup candidate reports "expected_amount_money": {"amount": 0, "currency": "USD"}. You can display "Pickup: Free" while asking for pickup_location_id. An omitted field means the price is not known yet; it never means zero.

The session's derived delivery uses the same candidate outcomes and rule. available, unavailable, and cannot_calculate outcomes omit the field, as do non-fixed pricing methods. Pickup-location previews do not carry it. This amount never enters the order's amounts: only a real delivery selection adds a delivery charge.

Address checks#

When you send a street address, Flint checks it. A group's address_advisories reports what the check found, with role naming the address it applies to:

verification_stateWhat to do
needs_reviewFlint priced the address but couldn't confirm every part of it. When suggested_address is present, offer it to the buyer, and quote again with the address they confirm. Flint never applies a suggestion itself.
unverifiableFlint couldn't verify the address. Show the advisory and let the buyer check or keep the entered address. Methods using the entered country, region or postal code can still have options; rules that need coordinates may remain unavailable.

Evaluation status#

evaluation_status says whether Flint could decide every method. Each choice group reports its own, and the quote's rolls them up: incomplete if any group is incomplete, otherwise degraded if any group is degraded.

evaluation_status on delivery quote
  • complete
    Every method was decided: it has an option, or it can't serve these items or this destination.
  • incomplete
    At least one method needs more input before Flint can price it, such as an address member or rates your server supplies. Collect what input_requirements lists and quote again.
  • degraded
    Every method that needs no more input was evaluated, but at least one couldn't be calculated, for example because a rate callback failed. Other methods' options are still selectable. merchant_diagnostics names the method and the cause.

How long a quote lasts#

Read expires_at from every quote instead of computing it. It depends on how the quote's methods are priced:

The quote's methodsexpires_at
All use fixed, tiered, or rate_table pricing24 hours after evaluated_at
Any uses calculated, callback, or caller_supplied pricingAt most 15 minutes after evaluated_at
The cart has tracked inventoryAt most 5 minutes, while the stock check holds

Every entry in a quote choice group's options has a required delivery_option_id. Use it when creating a selection. Preview options cannot be selected and do not require this ID.

An option can expire before its quote. Once an option's own expires_at passes, reads leave it out. How long the price holds after the buyer selects is up to the selection; see delivery selections.

Status#

status says whether the quote still matches the checkout. Flint works it out on every read, from the checkout as it is at that moment, so the checkout quote route, GET /v1/delivery-quotes/{delivery_quote_id}, and the list all report the same status and stale_reason.

Delivery quote statusFinal
  • active moves to consumed on a selection takes every option
  • consumed moves to active on the selection is cleared
  • active moves to stale on the checkout changes
  • consumed moves to stale on a selection from another quote replaces it
  • active moves to expired on expires_at passes
  • consumed moves to expired on expires_at passes
  • active moves to revoked on a revocation fences a dependency
status on delivery quote
Final values do not change again
  • active
    The quote matches the checkout and hasn't expired. The buyer can select from it once every group is ready.
  • consumed
    The current selection holds every option in the quote, and each option's consumed_by_delivery_selection_id names it. You can still create a selection from the quote, which replaces the current one, for example to add recipient details. Clearing the selection frees its options.
  • stale
    The checkout changed after the quote was evaluated. stale_reason says what changed. Create a new quote.
  • expiredFinal
    expires_at passed. Create a new quote.
  • revokedFinal
    A delivery revocation fenced a method, rate callback, signing key, or Location geography the quote used. delivery_revocation_id names the revocation, revocation_reason repeats its reason, and revoked_at says when. Create a new quote.

stale_reason says what made a quote stale. Only an API key sees it.

stale_reason on delivery quote
  • checkout_changed
    The order's delivery details changed, such as its line items, quantities, or discounts.
  • inventory_changed
    The tracked inventory the cart needs changed.
  • eligibility_changed
    The checkout information used to evaluate delivery eligibility changed, such as the customer the buyer verified.
  • selection_changed
    The checkout's current selection is neither the one the quote was built on (basis_delivery_selection_id) nor one made from this quote. A selection that expired or was released counts as no selection.
  • authority_changed
    The quote's checkout session or order no longer exists, or the checkout now has a different order.
  • superseded_by_priced_quote
    A priced quote replaced this pending quote after your server supplied its rates. superseded_by_delivery_quote_id names the replacement, and the replacement's basis_delivery_quote_id names this quote.

Rates your server supplies#

A method with caller_supplied pricing gets its rate from your server. Quote these checkouts from your server with an API key: when a checkout's methods include one, a quote request with the checkout credential returns 403 FORBIDDEN with reason merchant_credential_required. Pricing takes two quote requests:

Pricing a caller_supplied methodResponse
Your serverFlintPOST /v1/delivery-quotespending quote: incomplete, with pending_caller_rate_requestsprices each requested method and choice groupPOST again with basis_delivery_quote_id and method_resultspriced quote with selectable options
  1. Your server sends POST /v1/delivery-quotes to Flint
  2. Flint returns pending quote: incomplete, with pending_caller_rate_requests to Your server
  3. Your server sends prices each requested method and choice group to Your server
  4. Your server sends POST again with basis_delivery_quote_id and method_results to Flint
  5. Flint returns priced quote with selectable options to Your server
  • Answer every request exactly. method_results needs one entry for each delivery_method_revision_id and delivery_choice_group_id pair in pending_caller_rate_requests, with no extras or duplicates. A wrong count returns 400 INVALID_REQUEST at method_results. An extra or duplicate pair returns it at that entry, such as method_results[1], and a missing outcome field at that field, such as method_results[0].outcome.failure_category.
  • Repeat the first request's inputs. Send the same destination_address, buyer_location, pickup_location_id, and inventory_assignments. A changed input, or a checkout that changed in between, returns 409 DELIVERY_REQUOTE_REQUIRED with reason quote_stale and param basis_delivery_quote_id. Start again from a new pending quote.
  • Price each pending quote once. After a priced quote replaces it, the pending quote can't be a basis again.
  • Use a new Idempotency-Key for the second request, which is a different request.

The priced quote is a new quote with the same choice groups and the pending quote's expires_at. The pending quote becomes stale with reason superseded_by_priced_quote. Supply rates from your server shows the method_results body. An available outcome needs a delivery window: window_start_at and window_end_at, or offered_windows for the buyer to choose from. To have Flint call your rate service during the quote instead, use a delivery rate callback.

What each credential sees#

A quote created or read with the checkout credential has the same shape, without what only a merchant needs. The reference marks each of these fields.

The checkout credential works only with its own checkout session. A checkout_session_id or quote that belongs to any other checkout returns 404 RESOURCE_NOT_FOUND, the same as one that doesn't exist. To list quotes with it, send its own checkout_session_id.

Checkout credentialAPI key
RoutesCreate, read, and list quotes for its own checkout sessionCreate, read, and list quotes for any checkout in the environment
Request fieldsAddresses, buyer location, pickup store, and the selection assertionAlso inventory_assignments (which Location supplies tracked stock), method_results for caller-supplied rates, and tier_key
Choice groups and optionsWhat the buyer chooses fromAlso each group's candidate_outcomes, allowed_types, and execution_legs, and each option's delivery_method_revision_id, charge_tax_category, and execution_legs
Status and diagnosticsstatus, delivery_revocation_id, and buyer_reasonsAlso stale_reason, revocation_reason, revoked_at, superseded_by_delivery_quote_id, merchant_diagnostics, methods, and pending_caller_rate_requests
IDsdelivery_quote_id and each line item's order_idAlso top-level checkout_session_id, order_id, basis_delivery_quote_id, and basis_delivery_selection_id

Sending a merchant-only request field with the checkout credential returns 400 INVALID_REQUEST with param naming the field. destination_address, buyer_location, and an advisory's suggested_address are returned to the checkout credential only when it acts for the customer the buyer verified.

execution_legs lists the Locations an option's items leave from. With method_origin routing, each method leaves from its own origin, so shipping can leave from a warehouse while pickup leaves from the chosen store. A choice group lists execution_legs itself only when all of its methods leave from the same Locations.

Look up past quotes#

GET /v1/delivery-quotes lists the quotes Flint issued, and GET /v1/delivery-quotes/{delivery_quote_id} reads one, such as a quote ID from a support case. With an API key, both include merchant diagnostics.

Filter the list by checkout_session_id, order_id, status, evaluation_status, created_after, or created_before. The status filter matches the status each quote reports now. status and evaluation_status each take several values, which match any of them, and separate filters combine. Quotes come oldest first.

Each page examines at most 500 quotes, so a page can hold fewer than page_size quotes, or none, while next_page_token is still present. Keep requesting pages with page_token until a response has no next_page_token.

Errors#

  • HTTP 409
    DELIVERY_REQUOTE_REQUIREDRefresh, then retry
    Selecting from the quote, or pricing a pending quote, needs a fresh quote. details[0].reason says why, such as quote_expired, quote_stale, quote_revoked, or window_expired, caller_rates_required while your server still owes rates, or input_required when a choice group offers no option until the quote gets the input its input_requirements name. Create a new quote, let the buyer choose again, and send the request with a new Idempotency-Key.
  • HTTP 409
    VERSION_CONFLICTRefresh, then retry
    expected_delivery_selection_id doesn't match the checkout's current selection. details[0].current_delivery_selection_id is the current selection, or null when none is current. Read the checkout and quote again.
  • HTTP 409
    Reason terminal_status: the checkout session is paid, partially_paid, expired, closed, or invalidated, so it can't be quoted. details[0].current_status is its status. Selecting from a quote whose choice group has no option for this destination and cart returns reason choice_group_unavailable, with one detail per group.
  • HTTP 403
    Reason merchant_credential_required: the checkout credential asked for a quote on a checkout with a caller_supplied method. Quote from your server with an API key.
  • HTTP 404
    No checkout session or quote with this ID exists, or the checkout credential asked about another checkout. param names the ID.
  • HTTP 400
    An address member breaks a partial address rule, or the checkout credential sent a merchant-only field. param names the field.
Build your own checkoutQuote the buyer's address, select an option, and pay.Delivery optionsConfigure the methods, zones, and rates that quotes price.Delivery configurationMethods, profiles, pricing strategies, and diagnostics.

The Delivery quote object#

An estimate of available delivery options and their prices.

Returned by GET /v1/delivery-quotes/{delivery_quote_id} and carried by the endpoints below.

Attributes

basis_delivery_quote_idstring

The earlier delivery quote this quote was priced from. Omitted when it was not priced from one.

Not returned with a checkout credential

basis_delivery_selection_idstring

The delivery selection this quote was priced from. Omitted when it was not priced from one.

Not returned with a checkout credential

buyer_locationone of

Omitted for a checkout session credential that doesn't act for the customer the buyer verified.

buyer_reasonsarray of enumRequired

Buyer-safe reasons a choice group has no available option. Groups with an available option contribute no reasons. Merchant configuration details are never included.

  • address_required
  • address_incomplete
  • address_needs_review
  • outside_delivery_area
  • no_pickup_location_nearby
  • unavailable_for_these_items
  • temporarily_unavailable
checkout_session_idstring

Always present with an API key or dashboard credential.

Not returned with a checkout credential

choice_groupsarray of objectRequired

Groups of order items that each choose their own delivery option.

created_atstringRequired

When Flint created this quote.

delivery_quote_idstringRequired

Unique identifier for this delivery quote, prefixed `dqt_`.

delivery_revocation_idstring or nullRequired

The delivery revocation that revoked this quote. `null` when no revocation applies.

destination_addressobject

Omitted for a checkout session credential that doesn't act for the customer the buyer verified.

evaluated_atstringRequired

Time Flint priced this quote.

evaluation_statusenumRequired

How completely Flint evaluated the candidate delivery methods.

  • complete
  • incomplete
  • degraded
expires_atstringRequired

Authoritative expiry for this quote: 24 hours when every method uses fixed, tiered, or rate_table pricing, and at most 15 minutes otherwise. A cart with tracked inventory shortens it to the 5 minutes its stock check stays valid. Read this value from every response.

input_requirementsarray of objectRequired

Inputs the delivery methods need. A quote requirement, such as the destination address, is input a method needs before Flint can price it. A selection requirement is input a delivery selection needs before payment, such as a recipient field or delivery window an option requires. A method that waits on the buyer's address or store, or on an address the buyer must correct, already lists the recipient fields it requires. Those requirements name the method's choice group and have no delivery_option_ids.

inventory_reservation_idsarray of string

The cart reservation IDs the merchant supplied for routing credit. Omitted from checkout-credential responses; reservation quantities and details are never included.

Not returned with a checkout credential

inventory_unavailableboolean

True when a required delivery group has no option and a candidate lacks the requested stock.

merchant_diagnosticsarray of object

Always present with an API key or dashboard credential.

Not returned with a checkout credential

methodsarray of object

Delivery methods evaluated for this quote.

Not returned with a checkout credential

order_idstring

Always present with an API key or dashboard credential.

Not returned with a checkout credential

pending_caller_rate_requestsarray of object

Delivery methods that wait for your integration to supply a rate. Supply them with `method_results` in a new quote.

Not returned with a checkout credential

revocation_reasonenum

Why the quote was revoked: the reason on the delivery revocation that fenced a dependency this quote used. Present when status is revoked.

Not returned with a checkout credential

  • unsafe_configuration
  • location_unavailable
  • credential_compromise
  • legal_requirement
  • other
revoked_atstring

Time the quote was revoked. Omitted until a delivery revocation revokes it.

Not returned with a checkout credential

selection_requiredbooleanRequired

Whether the buyer must choose a delivery option before paying.

stale_reasonenum

Why this quote can no longer be used. Request a new quote. Omitted unless `status` is `stale`.

Not returned with a checkout credential

  • checkout_changed
  • selection_changed
  • eligibility_changed
  • inventory_changed
  • authority_changed
  • superseded_by_priced_quote
statusenumRequired

Whether the quote can be selected now, derived from the current checkout or renewal order on every read.

  • active
  • consumed
  • stale
  • expired
  • revoked
superseded_by_delivery_quote_idstring

The priced delivery quote that replaced this quote. Its basis_delivery_quote_id names this quote.

Not returned with a checkout credential

JSON
{
  "buyer_reasons": [
    "address_required"
  ],
  "choice_groups": [
    {
      "availability_status": "ready",
      "delivery_choice_group_id": "dcgrp_01K1P6G4M7H2N8Q9R3S5T6V7WX",
      "evaluation_status": "complete",
      "input_requirements": [
        {
          "constraint": {
            "type": "string"
          },
          "delivery_input_requirement_id": "req_0123456789abcdef",
          "field_path": "destination_address",
          "purpose": "quote"
        }
      ],
      "line_items": [
        {
          "order_id": "ord_01K1P6G4M7H2N8Q9R3S5T6V7WX",
          "order_line_item_id": "li_01K1P6G4M7H2N8Q9R3S5T6V7WX",
          "quantity": 1
        }
      ],
      "method_types": [
        "shipment"
      ],
      "options": [
        {
          "amount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "buyer_instructions": {
            "enabled": true,
            "required": true
          },
          "delivery_method_id": "dmet_01K1P6G4M7H2N8Q9R3S5T6V7WX",
          "delivery_option_id": "dopt_01K1P6G4M7H2N8Q9R3S5T6V7WX",
          "delivery_plan": {
            "type": "single_delivery"
          },
          "display_position": 1,
          "name": "Standard delivery",
          "recommended": true,
          "shipment": {
            "service_level": "Ground"
          },
          "taxable": true,
          "type": "shipment",
          "window_selection": "none"
        }
      ],
      "stable_key": "example"
    }
  ],
  "created_at": "2026-08-02T16:00:00Z",
  "delivery_quote_id": "dqt_01K1P6G4M7H2N8Q9R3S5T6V7WX",
  "delivery_revocation_id": "drev_01K1P6G4M7H2N8Q9R3S5T6V7WX",
  "evaluated_at": "2026-08-02T16:00:00Z",
  "evaluation_status": "complete",
  "expires_at": "2026-08-02T16:00:00Z",
  "input_requirements": [
    {
      "constraint": {
        "type": "string"
      },
      "delivery_input_requirement_id": "req_0123456789abcdef",
      "field_path": "destination_address",
      "purpose": "quote"
    }
  ],
  "merchant_diagnostics": [],
  "selection_required": true,
  "status": "active"
}

List delivery quotes#

GET/v1/delivery-quotes

Requires scope commerce.delivery.read or commerce.delivery.write

Rate limit: read

Returns delivery quotes with status derived identically to individual quote reads. A checkout credential must send its own checkout_session_id and receives the buyer view. Quotes are ordered by created_at and delivery_quote_id ascending. Each page scans at most 500 rows and may contain fewer than page_size items while next_page_token is present. Default order: created_at ascending, then delivery_quote_id ascending.

Query parameters

checkout_session_idstring

Filter by checkout session. Required with a checkout credential, and must be the credential's own checkout session.

order_idstring

Filter by order.

statusarray of enum

Filter by lifecycle status. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.

  • active
  • consumed
  • stale
  • expired
  • revoked
evaluation_statusarray of enum

Filter by evaluation status. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.

  • complete
  • incomplete
  • degraded
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

page_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.

Response · 200

Delivery quote page.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

curl https://api.withflintpay.com/v1/delivery-quotes \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Delivery quote page.

JSON
{
  "data": [
    {
      "buyer_reasons": [
        "address_required"
      ],
      "choice_groups": [
        {
          "availability_status": "ready",
          "delivery_choice_group_id": "dcgrp_01K1P6G4M7H2N8Q9R3S5T6V7WX",
          "evaluation_status": "complete",
          "input_requirements": [
            {
              "constraint": {
                "type": "string"
              },
              "delivery_input_requirement_id": "req_0123456789abcdef",
              "field_path": "destination_address",
              "purpose": "quote"
            }
          ],
          "line_items": [
            {
              "order_id": "ord_01K1P6G4M7H2N8Q9R3S5T6V7WX",
              "order_line_item_id": "li_01K1P6G4M7H2N8Q9R3S5T6V7WX",
              "quantity": 1
            }
          ],
          "method_types": [
            "shipment"
          ],
          "options": [
            {
              "amount_money": {
                "amount": 0,
                "currency": "USD"
              },
              "buyer_instructions": {
                "enabled": true,
                "required": true
              },
              "delivery_method_id": "dmet_01K1P6G4M7H2N8Q9R3S5T6V7WX",
              "delivery_option_id": "dopt_01K1P6G4M7H2N8Q9R3S5T6V7WX",
              "delivery_plan": {
                "type": "single_delivery"
              },
              "display_position": 1,
              "name": "Standard delivery",
              "recommended": true,
              "shipment": {
                "service_level": "Ground"
              },
              "taxable": true,
              "type": "shipment",
              "window_selection": "none"
            }
          ],
          "stable_key": "example"
        }
      ],
      "created_at": "2026-08-02T16:00:00Z",
      "delivery_quote_id": "dqt_01K1P6G4M7H2N8Q9R3S5T6V7WX",
      "delivery_revocation_id": "drev_01K1P6G4M7H2N8Q9R3S5T6V7WX",
      "evaluated_at": "2026-08-02T16:00:00Z",
      "evaluation_status": "complete",
      "expires_at": "2026-08-02T16:00:00Z",
      "input_requirements": [
        {
          "constraint": {
            "type": "string"
          },
          "delivery_input_requirement_id": "req_0123456789abcdef",
          "field_path": "destination_address",
          "purpose": "quote"
        }
      ],
      "merchant_diagnostics": [],
      "selection_required": true,
      "status": "active"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "page_2",
  "request_id": "req_01KWM6AASYFSEP53E9W34N8J33"
}

Create delivery quote#

POST/v1/delivery-quotesIdempotent

Requires scope commerce.delivery.write

Rate limit: delivery_quote

Creates an exact delivery quote for the checkout session named by checkout_session_id, without holding inventory. A checkout credential can quote only its own checkout session.

Request body

basis_delivery_quote_idstring

ID of an earlier delivery quote for this checkout session to price from again, such as to add caller-supplied rates.

Not accepted with a checkout credential

buyer_locationone of

Buyer location used to evaluate pickup and local delivery. Send it when a method needs it.

checkout_session_idstringRequired

Checkout session to quote. With a checkout credential, this must be the credential's own checkout session; any other ID is refused as not found.

destination_addressobject

Address used to price shipment or local delivery. Partial is fine: send what the buyer has entered, at least country. A selection that sends destination_address must send a complete address; a selection that omits it keeps this partial address, and its input_requirements lists missing members that must be supplied before payment.

expected_delivery_selection_idstring or null

Optional assertion on CheckoutSession.delivery.delivery_selection_id. Omit to make no assertion, send null to assert that no selection exists, or send an ID to assert that it is current.

inventory_assignmentsarray of object

Locations your integration assigns stock from. The assignments for an inventory demand together cover its quantity, and a demand can have several.

Not accepted with a checkout credential

inventory_reservation_idsarray of string

Requires a merchant credential with delivery-write scope. Merchant-created cart reservations to credit when routing this quote, without changing their holds. Pass the same IDs when creating the delivery selection to adopt matching held units. At most 100 unique IDs. Explicit IDs, including an empty array, replace the session binding for this request. When omitted, both merchant and buyer requests use eligible session-bound holds; ineligible bound holds are silently skipped. First adopter wins when sessions share a hold. Ineligible explicit IDs are refused as not found.

Not accepted with a checkout credential

method_resultsarray of object

Rates your integration supplies for methods with caller-supplied pricing.

Not accepted with a checkout credential

pickup_location_idstring

ID of the Location at which to price pickup methods.

tier_keyinteger

Caller-defined nonnegative lookup key used by methods whose tiered pricing basis is caller.tier_key. Merchant authentication is required.

Not accepted with a checkout credential

Response · 201

Checkout delivery quote.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

curl -X POST https://api.withflintpay.com/v1/delivery-quotes \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "checkout_session_id": "cs_01K1P6G4M7H2N8Q9R3S5T6V7WX",
    "destination_address": {
      "city": "Brooklyn",
      "country": "US",
      "line1": "120 Kent Avenue",
      "postal_code": "11249",
      "state": "NY"
    },
    "expected_delivery_selection_id": null
  }'

Retrieve delivery quote#

GET/v1/delivery-quotes/{delivery_quote_id}

Requires scope commerce.delivery.read or commerce.delivery.write

Rate limit: read

Returns a delivery quote by its ID. API keys receive the same merchant view as the quote list. A checkout credential reads only quotes of its own checkout session and receives the buyer view; any other quote is refused as not found.

Path parameters

delivery_quote_idstringRequired

Delivery quote ID. Must be a valid ID with prefix dqt_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 200

Delivery quote.

Same response as Create delivery quote.

curl https://api.withflintpay.com/v1/delivery-quotes/dqt_01KEZF7C009EB1AVCDJBN4BBVV \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Delivery quote.

JSON
{
  "data": {
    "buyer_reasons": [
      "address_required"
    ],
    "choice_groups": [
      {
        "availability_status": "ready",
        "delivery_choice_group_id": "dcgrp_01K1P6G4M7H2N8Q9R3S5T6V7WX",
        "evaluation_status": "complete",
        "input_requirements": [
          {
            "constraint": {
              "type": "string"
            },
            "delivery_input_requirement_id": "req_0123456789abcdef",
            "field_path": "destination_address",
            "purpose": "quote"
          }
        ],
        "line_items": [
          {
            "order_id": "ord_01K1P6G4M7H2N8Q9R3S5T6V7WX",
            "order_line_item_id": "li_01K1P6G4M7H2N8Q9R3S5T6V7WX",
            "quantity": 1
          }
        ],
        "method_types": [
          "shipment"
        ],
        "options": [
          {
            "amount_money": {
              "amount": 0,
              "currency": "USD"
            },
            "buyer_instructions": {
              "enabled": true,
              "required": true
            },
            "delivery_method_id": "dmet_01K1P6G4M7H2N8Q9R3S5T6V7WX",
            "delivery_option_id": "dopt_01K1P6G4M7H2N8Q9R3S5T6V7WX",
            "delivery_plan": {
              "type": "single_delivery"
            },
            "display_position": 1,
            "name": "Standard delivery",
            "recommended": true,
            "shipment": {
              "service_level": "Ground"
            },
            "taxable": true,
            "type": "shipment",
            "window_selection": "none"
          }
        ],
        "stable_key": "example"
      }
    ],
    "created_at": "2026-08-02T16:00:00Z",
    "delivery_quote_id": "dqt_01K1P6G4M7H2N8Q9R3S5T6V7WX",
    "delivery_revocation_id": "drev_01K1P6G4M7H2N8Q9R3S5T6V7WX",
    "evaluated_at": "2026-08-02T16:00:00Z",
    "evaluation_status": "complete",
    "expires_at": "2026-08-02T16:00:00Z",
    "input_requirements": [
      {
        "constraint": {
          "type": "string"
        },
        "delivery_input_requirement_id": "req_0123456789abcdef",
        "field_path": "destination_address",
        "purpose": "quote"
      }
    ],
    "merchant_diagnostics": [],
    "selection_required": true,
    "status": "active"
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6AASYFSEP53E9W34N8J33"
}

Was this helpful?