Access token — corporate / sub corporate key

This API is used to get an access token with a corporate or a sub corporate (corporate category) Developer API key. Both keys use the same URL; only the body changes.

It returns an access_token valid for 75 minutes. What it reaches depends on the key:

KeyToken reachesBody
CorporateEvery location of the corporate and its sub corporates. Use location_id / corporate_category_id filters in the following requests to narrow the results.corporate_id (only when the key is linked to more than one corporate)
Sub corporateOnly the locations of that sub corporate. Send location_id in the body to get a token for just one of its locations.{}, or location_id

Note: Writes (create customer, save card, bank linking...) need a location_id in the body or query when the token covers more than one location.

URL

{{interface_url}}/{{version}}/access_token

Method

POST

Headers

Api-Key: {your Developer API key}

Request Parameters

FieldTypeRequiredDescription
corporate_idIntegerNoCorporate key only. Corporate linked to the key. Needed only when the key is linked to more than one corporate.
location_idIntegerNoSub corporate key only. Limit the token to one location of the sub corporate.

URL Parameters

None.

Example Request — corporate key (cURL)

curl --location --request POST '{{interface_url}}/{{version}}/access_token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Api-Key: {{interface_api_key}}' \
--data '{
  "corporate_id": 1520
}'

Example Request — sub corporate key (cURL)

curl --location --request POST '{{interface_url}}/{{version}}/access_token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Api-Key: {{interface_api_key}}' \
--data '{}'

Example Request — sub corporate key, one location (cURL)

curl --location --request POST '{{interface_url}}/{{version}}/access_token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Api-Key: {{interface_api_key}}' \
--data '{
  "location_id": 279685
}'

Example Response (JSON) — 200

{
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}

Error Responses

Format: { "error": { "code", "name", "message", "details" } }

StatusErrorWhen
404developer_not_foundThe Api-Key does not exist.
401developer_is_not_activeThe API key is disabled.
Path Params
string
required
Body Params
Headers
string
Response

Language
Credentials
http
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json