Skip to main content
GET
/
v1
/
prices
/
products
Get prices for multiple products with dynamic pricing and multi-currency support
curl --request GET \
  --url https://api.tybritelabs.com/v1/prices/products \
  --header 'Authorization: Bearer <token>'
{
  "products": [
    {
      "product_id": "d8cea277-9bb6-4942-b9e9-2f2ac351509f",
      "name": "Apple MacBook Pro",
      "sku": "APP-MBP-13",
      "base_price": 189999,
      "base_currency": "EUR",
      "resolved_price": 189999,
      "display_price": 225451.29,
      "display_currency": "USD",
      "currency_symbol": "$",
      "exchange_rate": 1.186592,
      "has_variants": false,
      "price_breakdown": {
        "base_price": 189999,
        "discounts": [],
        "final_price": 189999,
        "currency_conversion": {
          "from_currency": "EUR",
          "to_currency": "USD",
          "rate": 1.186592,
          "converted_amount": 225451.29
        }
      }
    }
  ],
  "total": 12,
  "limit": 50,
  "offset": 0,
  "pricing_context": {
    "location": null,
    "region": "United States",
    "customer_segment": null,
    "customer_tier": null,
    "quantity": null,
    "currency": "USD",
    "exchange_rate": 1.186592
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.tybritelabs.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API Key Authentication

Use your API key in the Authorization header:

Authorization: Bearer tybrite_sk_live_YOUR_KEY

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: write operations, authentication, payment verification, AI recommendations

Publishable Keys (Client-Safe):

  • Format: tybrite_pk_live_* (production) or tybrite_pk_test_* (sandbox)
  • Read-only access (GET requests only, plus POST semantic search)
  • ✅ Safe for client-side JavaScript, mobile apps, and public code
  • Allowed for: browsing products, search, CMS content, pricing queries

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)
  • All write operations: Secret key required
  • All read operations: Both key types allowed

Using a publishable key for restricted operations returns 403 Forbidden.

Query Parameters

Search by product name or SKU

category_id
string<uuid>

Filter by category UUID

subcategory_id
string<uuid>

Filter by subcategory UUID

limit
integer
default:50

Maximum number of products to return (1-200)

Required range: 1 <= x <= 200
offset
integer
default:0

Number of products to skip for pagination

Required range: x >= 0
fields
string

Comma-separated list of fields to return (reduces bandwidth by 50-90%).

Allowed fields: product_id, variant_id, name, sku, description, price, selling_price, stock, image, category_name, brand, has_variants, variant_count, total_stock, base_price, resolved_price, display_price, base_currency, display_currency, currency_symbol, exchange_rate, price_breakdown, price_breakdown., pricing_context, pricing_context.

Example: fields=name,display_price,display_currency,currency_symbol,has_variants

place_name
string

City or region name for geographic currency detection (e.g., "New York, USA", "London, UK", "Nairobi, Kenya").

How it works:

  1. Geocodes place name to coordinates
  2. Matches coordinates to currency regions
  3. Returns prices in detected currency

Examples:

  • place_name=New York → USD
  • place_name=London → GBP
  • place_name=Nairobi, Kenya → KES
latitude
number<double>

Customer latitude for precise geographic currency detection.

Priority: Coordinates take priority over place_name if both provided.

Accuracy: Uses PostGIS boundary matching for accurate region detection.

Works with variants: Currency detection applies to all product variants.

Example: latitude=40.7128&longitude=-74.0060 (New York) → USD

longitude
number<double>

Customer longitude for precise geographic currency detection.

Must be used with latitude parameter.

Example: latitude=51.5074&longitude=-0.1278 (London) → GBP

location
string

DEPRECATED: Use place_name instead for better geocoding support.

Location/country for location-based pricing rules.

region
string

Manual region override for pricing rules (bypasses automatic detection)

customer_id
string<uuid>

Customer UUID for personalized pricing.

When provided, the worker resolves the customer's RFM segment and tier server-side (from the customers + customer_stores tables) and feeds them into pricing rule evaluation. There is no need to pass segment/tier directly.

quantity
integer

Quantity for volume-based pricing discounts

Required range: x >= 1

Response

Successfully retrieved products with dynamic pricing and currency conversion.

Response includes:

  • Products with converted prices in detected/default currency
  • Price breakdown showing base price, discounts, and final price
  • Pricing context with currency info and detection method
  • Pagination metadata

Note: List endpoint returns flat structure with default variant only. For full variant pricing, use GET /v1/prices/products/:id

products
object[]
total
integer

Total number of products matching filters

limit
integer

Number of products per page

offset
integer

Number of products skipped

pricing_context
object

Global pricing context for the request. customer_segment and customer_tier are resolved server-side from customer_id (they are not request parameters).