Skip to main content
POST
/
api
/
public
/
v1
/
ratings
Create Rating Jsonapi
curl --request POST \
  --url https://api.example.com/api/public/v1/ratings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "type": "<string>",
    "attributes": {
      "note_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "rater_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "helpfulness_level": "HELPFUL"
    }
  }
}
'
{
  "data": {
    "id": "<string>",
    "attributes": {
      "note_id": "<string>",
      "rater_id": "<string>",
      "helpfulness_level": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    },
    "type": "ratings"
  },
  "jsonapi": {
    "version": "1.1"
  },
  "links": {
    "self_": "<string>",
    "first": "<string>",
    "last": "<string>",
    "prev": "<string>",
    "next_": "<string>",
    "describedby": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-Key
string | null

Body

application/json

JSON:API request body for creating a rating.

data
RatingCreateData · object
required

JSON:API data object for rating creation.

Response

Successful Response

JSON:API response for a single rating resource.

data
RatingResource · object
required

JSON:API resource object for a rating.

jsonapi
Jsonapi · object

JSON:API links object for pagination and resource links.

Uses field aliases for 'self' and 'next' which are Python reserved words. Always use by_alias=True when serializing. Includes JSON:API 1.1 'describedby' link for API documentation.