Token is an identifier returned both after successful logging in or getting anonymous token. In every case, the token is returned as the response body.

To make any operation on cart/user profile and any other resource requiring or making a use of the user identity, the token must be added to the request header:

Validation of the token

Token live for a limited time. In order to check if the order is still valid, use:

Authorization: Bearer [token]

If the token is still valid, you will get the same token echoed in response.

If the token is still valid, but soon to expire, you'll get the new token that will prolong the session.

If the token is not valid, you'll get a TOKEN_INVALID response.

Click Try It! to start a request and see the response here!