Headers

For the most part, all data accepted and returned by calls to the Bonusly API is in the body in JSON form. Occasionally however, we accept and return information in the headers.

The /users/me endpoint returns the current user's access token too. The 'me' endpoint also returns the X-Bonusly-Country-Code header containing the country code where the request originated.

Creations of bonuses through the API check the Application-Name header to determine the application and version of the service making the call. The proper form for providing application and version information is 'app/version'.

Ex:

--header 'Application-Name: iPhone/2.0'

This information will then be reflected in the bonus object's :via field. If no application name is provided, a default value of 'api' will be used.

Endpoints which support pagination return the X-Total-Count header. This is the total number of items in the collection.