Skip to main content
POST
Quote the price of a Subscribe & Save offer

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
offer_id
string<uuid>
required

The offer to quote, from GET /v1/subscribe-save/offers.

items
object[]
required

The items to quote, at most 50.

Required array length: 1 - 50 elements
interval_unit
enum<string>

Sent together with interval_count to check that the offer allows the interval; the response echoes it as interval.

Available options:
week,
month
interval_count
integer
Required range: 1 <= x <= 52

Response

The quote.

The price per delivery of a set of items under one Subscribe & Save offer. All amounts are in the smallest unit of the store's currency (cents for a two-decimal currency).

available is false when the offer is not live or covers none of the items; no prices are returned then. Only the items the offer covers are listed in covered_items and priced; the other items of a basket are charged normally.

available
boolean
required
Example:

true

offer_id
string<uuid>
Example:

"4c1c7b9e-2f58-4f43-9d3a-6f0e2a8b1c11"

currency
string

ISO 4217 currency code.

Example:

"USD"

covered_items
object[]
subtotal_cents
integer

The covered items' total before any discount.

Example:

4000

first_order_discount_cents
integer

The discount on the first delivery.

Example:

800

renewal_discount_cents
integer

The discount on each later delivery.

Example:

600

first_order_price_cents
integer

What the covered items cost on the first delivery.

Example:

3200

renewal_price_cents
integer

What the covered items cost on each later delivery, at today's catalogue prices.

Example:

3400

free_shipping
boolean
min_cycles
integer
intervals
object[]
stacks_with_promotions
boolean
interval
object

The interval that was asked about, echoed when interval_unit and interval_count were sent.