Skip to main content
POST

Authorizations

Authorization
string
header
required

API Key Authentication

Use your API key in the Authorization header:

Key Types:

Secret Keys (Server-Side Only):

  • 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/*): Secret key required
  • Payment verification (POST /v1/payments/verify): Secret key required
  • 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.

Body

application/json

Input for a shipping fee calculation. Provide GPS coordinates (latitude + longitude), a place_name to geocode, or — for carrier options only — address_to with a parcel.

latitude
number<double>
required

Customer's GPS latitude

Required range: -90 <= x <= 90
Example:

40.6782

longitude
number<double>
required

Customer's GPS longitude

Required range: -180 <= x <= 180
Example:

-73.9442

country_code
string

ISO 3166-1 alpha-2 country code of the destination. Matches zones defined by country; a value sent here takes precedence over the one found from the location.

Pattern: ^[A-Za-z]{2}$
Example:

"US"

postal_code
string

Postcode of the destination. Matches zones narrowed to postcode prefixes; a value sent here takes precedence over the one found from the location.

Maximum string length: 16
Example:

"11225"

items
object[]

The basket's lines. Optional; with it, the store's weight-based rates and its rules for product categories (surcharges, local-only delivery, collection only) apply. A rate that depends on weight applies only when every line's variant has a weight.

Maximum array length: 500
order_total
number<float>

The order's merchandise after discounts, before tax and shipping. A free-delivery threshold is compared against this figure. Must be a number of zero or more; defaults to 0.

Required range: x >= 0
Example:

50

address_to
object

A shipping address for live carrier rating. Supplied alongside a parcel to ALSO get live carrier rates from a connected carrier account (returned as rates[]).

address_from
object

A shipping address for live carrier rating. Supplied alongside a parcel to ALSO get live carrier rates from a connected carrier account (returned as rates[]).

parcel
object

Parcel dimensions + weight for live carrier rating.

Response

The delivery charge for the location

The store's delivery charge for a location and order total. An address is priced by the first zone that contains it, otherwise by the distance rate for its distance from the store, otherwise by the store's "everywhere else" rate. A store with no delivery rates at all charges nothing (applied_rule: none). options lists every delivery option and pickup location the shopper can choose between. When the store does not deliver to the address but offers pickup, deliverable is false, fee is null and options holds the pickup locations only; when it offers neither, the answer is 400 shipping_not_deliverable instead.

fee
number<float> | null

The standard delivery charge (the place option's fee), in currency. Null on a carrier-options-only request (no location was sent) and when the store does not deliver to the address but offers pickup (deliverable: false).

Required range: x >= 0
Example:

5.99

currency
string | null

The currency of fee and free_threshold — the store's own currency.

Example:

"USD"

zone_name
string | null

The zone that priced the address, when a zone did.

Example:

null

tier_name
string | null

The distance rate that priced the address, when one did.

Example:

"Local (within 10 km)"

distance_meters
number<float> | null

Distance from the store to the address in meters, when it was measured.

Example:

8547.99

is_free
boolean

True when no delivery charge applies to this order (fee is 0).

Example:

false

free_threshold
number | null

The order total from which the matched rate delivers free, or null when it has none.

Example:

75

configured
boolean | null

Whether the store has any delivery rates. False means delivery is not charged through the store's rates at all.

Example:

true

reason
string

A short, shopper-readable explanation of the charge.

Example:

"Local (within 10 km)"

applied_rule
enum<string>

Which of the store's rates priced the address:

  • zone: a delivery zone contains it
  • distance: a distance rate matched its distance from the store
  • fallback: the store's "everywhere else" rate
  • none: the store has no delivery rates (fee 0), or a carrier-options-only request
Available options:
zone,
distance,
fallback,
none
Example:

"distance"

coordinates
object

The address's coordinates (geocoded when a place_name was sent), with the country and postcode used to match zones when known.

deliverable
boolean

Whether the store delivers to the address. False when only pickup is offered for it — because the address is outside the store's delivery area, or because an item in the basket can only be collected.

Example:

true

restriction
enum<string>

A limit the basket's items place on how the order can be received, from the store's rules for product categories:

  • none: no limit
  • local_only: delivered only within the store's map zones and distance tiers, not to country or postcode zones or the "everywhere else" rate
  • pickup_only: collection only; no delivery option is offered
Available options:
none,
local_only,
pickup_only
Example:

"none"

options
object[]

Every way the shopper can receive the order: the delivery options first (place, then any named options), then the pickup locations, nearest first when the location is known. Absent on a carrier-options-only request.

fulfilled_from
object | null

When the store delivers from whichever of its locations is nearest the shopper, the location this order would leave from; distance tiers are measured from it. Null otherwise.

rate_source
enum<string>

Which source produced the result — the store's zone, distance tier or fallback rate, a connected carrier account (shippo), the store's custom shipping extension (custom), or none.

Available options:
zone,
tier,
fallback,
shippo,
custom,
none
Example:

"tier"

rates
object[]

Carrier options, present when the store has a carrier account or a custom shipping extension AND a destination address + parcel were sent. Each is a real quote. To order with one, pass its rate_id and source as shipping_rate_id / shipping_rate_source on createOrder, where the option is fetched again from its source before it is charged.