Get All

GET /api/users

Fetch all users

Query parameters

  • page integer

    Default value is 1.

  • perPage integer

    Maximum value is 250. Default value is 100.

  • sortBy string | null

    Default value is last_name, first_name.

  • isCaptain boolean | null

    Default value is any.

  • isEnabled boolean | null

    Default value is any.

  • congregationId string | null
  • circuitId string | null
  • role integer

    Default value is any.

  • availableOnDate string | string(date) | null
  • availableForShift string | null
  • availableForLocation string | null
  • format string

    Values are json or excel. Default value is json.

  • labelsIds array[string] | null

Responses

  • 200 application/json

    Successful Response

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

        Minimum length is 2, maximum length is 50.

      • lastName string Required

        Minimum length is 2, maximum length is 50.

      • email string | null Required

        Minimum length is 3, maximum length is 254.

      • primaryPhone string | null Required

        Minimum length is 6, maximum length is 20.

      • secondaryPhone string | null Required

        Minimum length is 6, maximum length is 20.

      • isWhatsappEnabled boolean | null
      • isCaptain boolean | null
      • isEnabled boolean | null
      • id string Required
      • name string Required
      • username string Required
      • role integer Required

        Values are 100, 50, 40, 30, 20, or 10.

      • congregation object Required
        Hide congregation attributes Show congregation attributes object
        • id string Required
        • name string Required
        • city string Required
        • state string | null
      • availabilityCount integer Required
      • whatsappPrimaryPhone string | null
      • lastSignedInAt string(date-time) | null
      • labels array[object] Required
        Hide labels attributes Show labels attributes object
        • name string Required

          Minimum length is 1, maximum length is 50.

        • bgColor string Required

          Maximum length is 20.

        • id string Required
      • 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/users
curl \
 -X GET https://ppammedellin.com/api/users \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "items": [
    {
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "primaryPhone": "string",
      "secondaryPhone": "string",
      "isWhatsappEnabled": true,
      "isCaptain": true,
      "isEnabled": true,
      "id": "string",
      "name": "string",
      "username": "string",
      "role": 100,
      "congregation": {
        "id": "string",
        "name": "string",
        "city": "string",
        "state": "string"
      },
      "availabilityCount": 42,
      "whatsappPrimaryPhone": "string",
      "lastSignedInAt": "2024-05-04T09:42:00+00:00",
      "labels": [
        {
          "name": "string",
          "bgColor": "string",
          "id": "string"
        }
      ],
      "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"
    }
  ]
}