Get All

GET /api/announcements

Fetch all announcements

Query parameters

  • page integer

    Default value is 1.

  • perPage integer

    Maximum value is 250. Default value is 100.

  • sortBy string | null

    Default value is -published_at.

  • isPublished boolean | null

    Default value is true.

Responses

  • 200 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • items array[object] Required
      Hide items attributes Show items attributes object
      • title string Required

        Minimum length is 4, maximum length is 100.

      • description string | null Required

        Maximum length is 150.

      • isPublished boolean | null

        Default value is false.

      • id string Required
      • contentSummary string Required
      • publishedAt string(date-time) | null
      • createdAt string(date-time) Required
      • updatedAt string(date-time) | null
    • total integer Required
    • page integer Required
    • perPage integer Required
    • totalPages integer Required
    • hasNextPage boolean Required
  • 422 application/json

    Validation Error

    Hide response attribute Show response attribute object
    • detail array[object]
      Hide detail attributes Show detail attributes object
      • loc array[string | integer] Required
      • msg string Required
      • type string Required
GET /api/announcements
curl \
 -X GET https://ppammedellin.com/api/announcements \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "items": [
    {
      "title": "string",
      "description": "string",
      "isPublished": false,
      "id": "string",
      "contentSummary": "string",
      "publishedAt": "2024-05-04T09:42:00+00:00",
      "createdAt": "2024-05-04T09:42:00+00:00",
      "updatedAt": "2024-05-04T09:42:00+00:00"
    }
  ],
  "total": 42,
  "page": 42,
  "perPage": 42,
  "totalPages": 42,
  "hasNextPage": true
}
Response examples (422)
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}