curl --request POST \
--url https://production-api.puppetvendors.com/authenticate \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"apiKey": "mk_live_your_key"
}
'{
"success": true,
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 1209600,
"scope": "merchant",
"shopDomain": "my-store.myshopify.com"
}
}{
"success": false,
"error": {
"message": "Invalid API key",
"code": "UNAUTHORIZED"
}
}Authentication
Authenticate and get API token
Authenticate using an API key to obtain a JWT token. The key’s prefix determines the token scope:
- Merchant key (
mk_live_…/mk_test_…, from Settings → API Access): returns a merchant-scoped token with full access. Named, rotatable and revocable per integration. - Vendor key (
vk_live_…/vk_test_…, from the vendor portal): returns a vendor-scoped token limited to that vendor’s data, carrying the scopes declared on the key.
A rotated key keeps working until the end of its grace window, so a rotation is an overlap rather than a cutover.
POST
/
authenticate
curl --request POST \
--url https://production-api.puppetvendors.com/authenticate \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"apiKey": "mk_live_your_key"
}
'{
"success": true,
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 1209600,
"scope": "merchant",
"shopDomain": "my-store.myshopify.com"
}
}{
"success": false,
"error": {
"message": "Invalid API key",
"code": "UNAUTHORIZED"
}
}Body
application/json
Was this page helpful?