Updates a rating by its ID. Only the score can be updated.
| Permission | Description |
|---|---|
ratings.update | Update your own rating |
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| rating-id | int | Yes | ID of the rating to update | 123 |
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| score | int | Yes | Score between 1 and 5 | 4 |
{
"score": 4
}
Returns the updated rating resource.
{
"rating": {
"id": 123,
"user_id": 42,
"ratable_type": "App\\Models\\Gym",
"ratable_id": 10,
"score": 4
}
}
For a full schema, see Rating Resource.
| Status | Description | Reference |
|---|---|---|
| 422 | Validation error | Validation error |
| 401 | Unauthorized | Authentication error |
| 403 | Forbidden (no permission) | Permission error |