Authentication

The Stokzone Web Service API authenticates each request with an API key (X-API-Key) sent on every call. Keys can only access endpoints covered by the scopes assigned to them.

X-API-Key header

Add your API key to every request as the X-API-Key header. The key is never sent in the body or query string.

HTTP
X-API-Key: sk_live_xxxxxxxxxxxx

Scope catalog

Grant each key only the scopes it needs (least-privilege principle). An endpoint returns 403 when the required scope is missing.

ScopeDescription
products:readList and read products and variants
products:writeCreate and update product cards
orders:readList and read orders
orders:writeUpdate order statuses
inventory:writeUpdate stock quantities
prices:writeUpdate sale prices
returns:readRead return and claim records
returns:writeApprove/update returns and claims
invoices:readRead invoice records
questions:readRead customer questions
questions:writeAnswer customer questions
customers:readRead customer cards
categories:readRead the category tree
brands:readRead the brand list
buybox:readRead buybox status
shipping:readRead shipping and shipment info
shipping:writeCreate and update shipments
reports:readRead sales and performance reports
webhooks:manageManage outbound webhook subscriptions

IP allowlisting

You can define an optional IP allowlist per API key. When a list is set, only requests from those IP addresses are accepted; others receive 403.

Authorization errors

401 UnauthorizedAPI key is missing, invalid or revoked.

401
{
  "detail": "Geçersiz veya eksik API anahtarı"
}

403 ForbiddenKey is valid but lacks the scope required for this endpoint.

403
{
  "detail": "Bu işlem için 'orders:read' yetkisi gerekli"
}