Available request headers


Authorization  
Needed for an authorization - it should be sent in "Bearer <your_token>" format

Example:

curl -X GET "https://<your_traffit_subdomain>.traffit.com/api/integration/v2/employees/"  \
-H "accept: application/json"  \
-H "Authorization:
Bearer <your_grant_access_token>"

X-Request-Page-Size
Defines how many records will be returned. Sending request without header will return maximum 10 records.

X-Request-Current-Page
Defines which page of a records will be returned. For example - if X-Request-Page-Size=10 and X-Request-Current-Page=1 the request will return first 10 records. When X-Request-Current-Page=2 - the request will return the next 10 records (on places 11-20)

X-Request-Filter
How can I filter records via API?

X-Request-Sort
How can I sort records via API? 

X-Response-Metadata
If sent, the response returns information which data and in which format will be returned via API endpoint

X-Request-Metadata
If sent, the response returns information which data and in which format can be sent via API endpoint.

Available response headers

X-Result-Count
Returns how many results were returned with request

X-Result-Current-Page
Returns current page of results (same as sent via X-Request-Current-Page)

X-Result-Page-Size
Returns how much records were returned (same as sent via X-Request-Page-Size)

X-Result-Total-Count
Returns total number of records which can be retrieved via API

X-Result-Total-Pages
Returns the maximum number pages which will return not-empty response. 

Did this answer your question?