Purpose: get an access token for all other endpoints. No token is needed to call this endpoint.
Required fields
Authorizationheader:Basicfollowed by the base64 encoding ofclient_id:secret. You receive the client ID and secret from Partner Success.- Body:
{"grant_type": "password"}for a new token, or{"grant_type": "refresh_token", "refresh_token": "<refresh_token>"}to renew one. No username or password is needed.
Example: new token
curl -X POST https://content.winkelstraat.nl/api/oauth/v1/retailer/token \
-H "Content-Type: application/json" \
-H "Authorization: Basic <base64 of client_id:secret>" \
-d '{"grant_type": "password"}'
Example: renew a token
curl -X POST https://content.winkelstraat.nl/api/oauth/v1/retailer/token \
-H "Content-Type: application/json" \
-H "Authorization: Basic <base64 of client_id:secret>" \
-d '{"grant_type": "refresh_token", "refresh_token": "<refresh_token>"}'
Errors
When no token can be issued (wrong client ID or secret, or an invalid refresh
token), the response contains "code": 422 and the message
Failed to acquired retailer token instead of an access_token. Check the body
for access_token: this error is currently returned with HTTP status 200.
POST
/api/oauth/v1/retailer/token
curl \
--request POST 'https://content.winkelstraat.nl/api/oauth/v1/retailer/token' \
--header "Content-Type: application/json" \
--header "Authorization: string" \
--data '{
"grant_type": "password"
}'
Request examples
# Headers
Authorization: string
# Payload
{
"grant_type": "password"
}
Response examples (200)
{
"access_token": "6f2a...e91c",
"expires_in": 3600,
"token_type": "bearer",
"scope": null,
"refresh_token": "9b7d...04af"
}
Response examples (200)
{
"access_token": "string",
"expires_in": 42,
"token_type": "string",
"scope": "string",
"refresh_token": "string",
"code": 42,
"message": "string"
}