API – User Rewards List
Use the API token for authorization. Read more in the article API token
- To get the list of user awards you need to send GET request to the following URI https://your-domain.davintoo.com/api/v2/badges/get-user-badges{user_id}
- The query string must contain the {user_id} user ID.
- The request must contain the headings Content-Type: application/json;charset=UTF-8 and Authorization: Bearer xxxxxx.
Request example:
curl 'https://your-domain.davintoo.com/api/v2/badges/get-user-badges/1762' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8'
Instead of a local address https://your-domain.davintoo.com you need to use the address of your instance.
Answer
-
In case of successful request (HTTP response code - 200), the following result will be returned:
- user rewards arraydata
- the number of all user rewardscount
-
In case of error (HTTP code response - 400) it returns JSON object with information about the error