Authorization token

All API requests can only be successfully executed with an authorization token created in Partner Panel. 

While creating or updating token you can pass the following fields:

  • Name of the token: This is only for internal informational purposes.
  • Expiration date: This field is required.
  • Access level of the token: This determines which operations the token is allowed to perform.

Token3

Within REST API, authorization token is embedded in the "X-AccessToken" header for every request to verify the user's identity and permissions.

Here's an example of request to get a list of modules used in client plans:

curl -X 'GET' \ 'https://api.gps-trace.com/partner/modules' \
  -H 'accept: application/json' \
  -H 'X-AccessToken: <your token>'


HTTP Status Codes

The following table provides information about the various HTTP status codes that the API might return.
Each status code indicates the result of the requested operation and helps in identifying the type of response or error encountered.

Code HTTP Status Description
OK 200 Successful operation
CREATED 201 Successful operation upon creation
FAILED_VALIDATION 400 Validation for this particular item failed
INVALID_PAYLOAD 400 Provided payload is invalid
INVALID_QUERY 400 The requested query parameters cannot be used
FORBIDDEN 403 You are not allowed to perform the current action
INVALID_TOKEN 403 Provided token is invalid
TOKEN_EXPIRED 401 Provided token is valid but has expired
ROUTE_NOT_FOUND 404 Endpoint does not exist
SERVICE_UNAVAILABLE 503 Could not use external service
INTERNAL_SERVER_ERROR 500 The server encountered an unexpected condition