V2 Alpha — This authentication flow is part of the V2 API preview. Breaking changes may occur.
Overview
All V2 Vendor API endpoints require a JWT token passed via thex-access-token header. You obtain this token by exchanging your vendor API key at POST /v2/authenticate.
Vendor API Key
Your merchant assigns a vendor API key to your account. Vendor keys always start with thevk_ prefix.
| Key Type | Prefix | Token Scope | Where to Find |
|---|---|---|---|
| Vendor key | vk_ | vendor — your data only | Provided by your merchant |
Authenticating
Exchange your vendor API key for a JWT token:Response
Using the Token
Include the token in all subsequent requests via thex-access-token header:
Token Expiry & Refresh
Tokens expire after 24 hours (86400 seconds). UsePOST /v2/refresh-token with a valid (non-expired) token to get a new one without re-authenticating:
Scope Behaviour
Vendor-scoped tokens automatically filter all data to your vendor account. For example, callingGET /v2/vendor/orders will only return orders containing your line items. Attempting to access another vendor’s data returns HTTP 403.