Update

PUT /api/users/{id}

Update a user

Path parameters

  • id string Required
application/json

Body Required

  • 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
  • congregation object Required
    Hide congregation attribute Show congregation attribute object
    • id string Required

      Minimum length is 26, maximum length is 26.

  • mate object | null Required
    Hide mate attribute Show mate attribute object | null
    • id string Required

      Minimum length is 26, maximum length is 26.

  • role integer Required

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

  • labels array[object] | null
    Hide labels attribute Show labels attribute object
    • id string Required

      Minimum length is 26, maximum length is 26.

Responses

  • 200 application/json

    Successful Response

    Hide response attributes Show response 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
    • mate object | null Required
      Hide mate attributes Show mate attributes object | null
      • id string Required
      • name string Required
      • 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
    • availability array[object] Required
      Hide availability attributes Show availability attributes object
      • id string Required
      • shift object Required
        Hide shift attributes Show shift attributes object
        • startTime string(time) Required
        • endTime string(time) Required
        • dayOfWeek integer | null Required

          Minimum value is 0.0, maximum value is 6.0.

        • seatsCount integer Required

          Minimum value is 1.0, maximum value is 20.0.

        • isEnabled boolean Required
        • id string Required
        • location object Required
          Hide location attributes Show location attributes object
          • id string Required
          • name string 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
  • 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
PUT /api/users/{id}
curl \
 -X PUT https://ppammedellin.com/api/users/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"firstName":"string","lastName":"string","email":"string","primaryPhone":"string","secondaryPhone":"string","isWhatsappEnabled":true,"isCaptain":true,"isEnabled":true,"congregation":{"id":"string"},"mate":{"id":"string"},"role":100,"labels":[{"id":"string"}]}'
Request example
{
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "primaryPhone": "string",
  "secondaryPhone": "string",
  "isWhatsappEnabled": true,
  "isCaptain": true,
  "isEnabled": true,
  "congregation": {
    "id": "string"
  },
  "mate": {
    "id": "string"
  },
  "role": 100,
  "labels": [
    {
      "id": "string"
    }
  ]
}
Response examples (200)
{
  "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"
  },
  "mate": {
    "id": "string",
    "name": "string",
    "congregation": {
      "id": "string",
      "name": "string",
      "city": "string",
      "state": "string"
    }
  },
  "availabilityCount": 42,
  "availability": [
    {
      "id": "string",
      "shift": {
        "startTime": "09:42:00+00:00",
        "endTime": "09:42:00+00:00",
        "dayOfWeek": 42,
        "seatsCount": 42,
        "isEnabled": true,
        "id": "string",
        "location": {
          "id": "string",
          "name": "string"
        }
      }
    }
  ],
  "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"
}
Response examples (422)
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}