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/*): state-changing POST calls require a secret key, for store and marketplace keys alike; GET /v1/auth/me accepts either key
  • 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.

Limited publishable keys: A publishable key can be limited to the products that carry one tag (for example starter:jewellery), created from the store's Developers page. The limit applies to the key, never to the shopper: shopper sign-up and sign-in stay store-wide.

  • Reads return only the slice: products (with their facets, filters, search, brands and specifications), categories and subcategories that hold in-slice products, collections, promotions, posts and lookbooks that carry the tag, reviews of in-slice products, prices, discovery lists and the store information summary, with every count computed on the slice. A product outside the slice answers 404, as if it did not exist.
  • A write that names a product or variant outside the slice (adding to the cart or wishlist, reserving stock, an order line, a review, a promotion calculation, a storefront event) answers 403 with the error code out_of_scope, and nothing is written or reserved. An order is refused as a whole.
  • A route that carries no slice behaviour is not available to the key: it answers 403 with endpoint_not_allowed.
  • Orders placed through such a key record the tag on the order's attribution as key_scope.
  • Secret keys and connected-app keys cannot be limited.
  • Responses are cached per key limit: a limited key never receives a response cached for the whole store, and the reverse.

Query Parameters

rate_source_format
enum<string>

How rate_source names a carrier-account source. provider uses shippo; neutral uses carrier. When omitted, the store's own setting applies (provider unless the merchant chose neutral). A request may send either spelling wherever a rate source is accepted.

Available options:
provider,
neutral

Body

application/json

Input for a shipping fee calculation. Provide GPS coordinates (latitude + longitude), a place_name to geocode, a country_code alone, 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 the store's rate delivers this order free (fee is 0 under a configured rate). Always false when configured is false: a store with no delivery rates has not offered free delivery.

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 the store has not set up delivery charges through us: fee is 0, is_free is false, and a storefront shows no delivery price or free-delivery message 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 | null

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.

cheapest_option
object | null

The lowest-fee available entry of options (the delivery options; the pickup options when there is no delivery), in the shape of a ShippingOption. Null when nothing is available, and null when the request named only a country and the store's rules are map zones and distance rates (a price would be a guess); show no delivery price then. Use it for "Delivery from £3.95" on a product page.

delivery
object | null

The store's delivery-day settings, for rendering delivery_window dates. 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, or carrier when rate_source_format=neutral is sent or the store's setting is neutral), the store's custom shipping extension (custom), or none.

Available options:
zone,
tier,
fallback,
shippo,
carrier,
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.