dambel

دمبل

shevron
ورود | ثبت نام

API Docs / ratings / index



GET /api/v1/ratings

Retrieves a list of ratings created by the authenticated user. Supports filtering and pagination.


Query Parameters

See /all for available query parameters.


Response

200 OK

Returns a paginated list of rating resources.

Schema

{
  "data": [
    { /* Rating Resource */ }
  ],
  "links": { /* Pagination Data */ },
  "meta": { /* Pagination Data */ }
}

Example

{
  "data": [
    {
      "id": 123,
      "user_id": 42,
      "ratable_type": "App\\Models\\Gym",
      "ratable_id": 10,
      "score": 5
    }
  ],
  "links": {
    "first": "https://api.example.com/api/v1/ratings?page=1",
    "last": "https://api.example.com/api/v1/ratings?page=10",
    "prev": null,
    "next": "https://api.example.com/api/v1/ratings?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 10,
    "path": "https://api.example.com/api/v1/ratings",
    "per_page": 50,
    "to": 50,
    "total": 500
  }
}

For a full schema, see Rating Resource and Pagination Data.


Error Responses

StatusDescriptionReference
401UnauthorizedAuthentication error
403Forbidden (no permission)Permission error
404Not foundNot-found error
footer wave
logo

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutube