Reward Sciences Documentation
Current Version
The current API version is v2.
Consumers should explicitly specify the API version they wish to interact using the following HTTP accept header in all API requests:
Accept: application/vnd.rewardsciences.v2+json
Schema
All API access is over HTTPS, and accessed from the https://api.rewardsciences.com.
All data is sent and received as JSON.
All timestamps are returned in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ
).
Root Endpoint
You can issue a GET request to the root endpoint to get all the endpoint categories that the API supports:
curl https://api.rewardsciences.com
Authentication
The OAuth2 standard protocol is used to grant API access to each organization.
Authenticate your requests sending an OAuth2 token on their Authorization
header.
curl -H "Authorization: Bearer OAUTH-TOKEN" https://api.rewardsciences.com
These tokens can be obtained on the Reward Sciences web app, under ‘Developer Settings/API Tokens’.
If your API Tokens get compromised you can always revoke them and obtain new ones.
API Tokens are to be used on server-to-server scenarios only. Do not leak your API Tokens to your end users.
Pagination
Requests that return multiple items will be paginated to 25 items and return the first page by default. You can navigate through pages and override this behavior by using the following parameters:
Parameter Name | Description | Default Value |
---|---|---|
limit | The number of items you want to be retrieved. | 25 |
offset | The number of items you want to skip before starting the retrieval. | 0 |
Examples:
curl 'https://api.rewardsciences.com/reward_categories?limit=100&offset=0'
curl 'https://api.rewardsciences.com/reward_categories?limit=100&offset=100'