API reference

The Product Data API exposes a versioned REST API at https://api.product-data-api.com. All endpoints return JSON.

Base URL

https://api.product-data-api.com

Authentication

Every request requires an API key in the Authorization header:

Authorization: Bearer pdapi_YOUR_KEY_HERE

See Authentication for key creation and rotation details.

Response envelope

All data endpoints wrap their payload in a shared envelope:

{
  "meta": {
    "requestId": "req_01HXYZ",
    "gtin": "885909950805",
    "facet": "product.price",
    "billable": true,
    "creditsConsumed": 5,
    "creditsRemaining": 2495,
    "reason": "fresh-offer",
    "responseTimeMs": 34
  },
  "data": { ... }
}
FieldTypeDescription
meta.requestIdstringUnique request identifier for support queries
meta.gtinstringNormalized GTIN used for the lookup
meta.facetstringFacet identifier (product.price in v1)
meta.billablebooleanWhether credits were consumed
meta.creditsConsumedintegerCredits debited for this request
meta.creditsRemainingintegerBalance after this request
meta.reasonstringBilling decision reason code
meta.responseTimeMsintegerServer processing time

Billing reason codes

CodeMeaning
fresh-offerUsable fresh data returned - billed
invalid-gtinChecksum validation failed - not billed
product-not-foundNo matching product - not billed
no-dataProduct found but no offers - not billed
stale-dataOffers exist but all exceed freshness window - not billed
insufficient-creditsInsufficient credits to reserve - 402 returned

Endpoints

Price facet

GET /api/v1/products/{gtin}/price

Returns fresh price offers for the given GTIN. See Price facet reference for the full schema.

Parameters

ParameterInTypeDescription
gtinpathstringGTIN-8, -12, -13, or -14
languagequerystringResponse language code (en, fr). Default: en

Customer billing

MethodPathDescription
GET/api/v1/customer/billing/catalogPublic billing catalog (no auth)
GET/api/v1/customer/billing/balanceCredit balance and buckets
GET/api/v1/customer/billing/transactionsLedger transaction history
GET/api/v1/customer/billing/invoicesStripe invoice list
POST/api/v1/customer/billing/checkout/packStart pack checkout
POST/api/v1/customer/billing/checkout/subscriptionStart subscription checkout
POST/api/v1/customer/billing/portalOpen billing portal

API key management

MethodPathDescription
GET/api/v1/customer/api-keysList API keys for the org
POST/api/v1/customer/api-keysCreate a new API key
POST/api/v1/customer/api-keys/{id}/rotateRotate a key (old secret invalidated)
POST/api/v1/customer/api-keys/{id}/revokePermanently revoke a key

Auth

MethodPathDescription
POST/api/v1/auth/oidcExchange OIDC token for session
POST/api/v1/auth/refreshRefresh session tokens
POST/api/v1/auth/logoutInvalidate session
GET/api/v1/auth/meCurrent session user

Error responses

All errors follow RFC 9457 Problem Detail. See Error handling.

Versioning

The current API version is v1. Breaking changes will increment the version prefix. The v1 contract is stable for production use.