LMS Collaborator knowledge base

Home/Technical requirements/API/API - Adding bonuses to users

API – Adding bonuses to users

  • To add bonuses, you need to send a POST request to the URI https://your-domain.davintoo.com/api/v2/gift-store/report/add-bonuses
  • The body of the request must contain a JSON object with the id of the users to whom bonuses need to be assigned, and the number of bonuses that they need to accrue
  • The request must contain headers Content-Type: application/json;charset=UTF-8 та X-Cbr-Authorization: Bearer API_TOKEN.

An example of a request:

curl 'https://your-domain.davintoo.com/api/v2/gift-store/report/add-bonuses' -H 'X-Cbr-Authorization: Bearer API_TOKEN' -H 'Content-Type: application/json;charset=UTF-8' --data-raw '{"userIds":[4048,5722],"points":20}'


Response

  • In case of a successful request (HTTP response code - 200), a result of the form will be returned: { "data": true }
  • In case of an error (HTTP response code - 400) returns a JSON object with information about the error.
Still have questions?
Our technical support team is always happy to help!
Write to us at technical support [email protected]. If you are registered on our Helpdesk - send request button below.
Send request