LMS Collaborator knowledge base

Home/Technical requirements/API/API - Import external rating

API – Import external rating

  • To import an external rating you need to send POST request to the following URI /api/rest.php/user-rating?action=set-external-user-rating
  • The request body should contain JSON object with information about user, date and rating value.
  • 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/rest.php/user-rating?action=set-external-user-rating' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8' --data-binary '{"user_id":6085,"rating":94,"date":"2022-07-17"}'

Format of the object with user information

* Mandatory fields are marked with an asterisk

To identify a user, either user_id or uid must be specified

Field Type Description
_userid Number Internal user ID in the system
uid String External user ID in the system
rating* Number Value of external rating
date* String Date in YYYY-MM-DD format


  • In case of successful request (HTTP code response - 200), it will be true
  • In case of error (HTTP response code - 400) it returns JSON object with error information:
    {"user_id":{"required":"Field cannot be empty"}}
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