Duplicate

POST /api/assignments/duplicate

Duplicate assignments

application/json

Body Required

  • date string | string(date) Required

  • dates array[string | string(date)] Required

    At least 1 but not more than 60 elements.

  • location object Required
    Hide location attribute Show location attribute object
    • id string Required

      Minimum length is 26, maximum length is 26.

  • keepState boolean

    Default value is false.

Responses

  • 200 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • date string | string(date) Required

    • isCaptain boolean | null

      Default value is false.

    • isAccepted boolean | null
    • isEditable boolean | null

      Default value is true.

    • id string | null
    • shift object Required
      Hide shift attributes Show shift attributes object
      • id string Required
      • startTime string(time) Required
      • endTime string(time) Required
      • location object Required
        Hide location attributes Show location attributes object
        • id string Required
        • name string Required
      • dayOfWeek integer Required
    • user object | null
      Hide user attributes Show user attributes object | null
      • 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
      • 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
      • createdAt string(date-time) Required
      • updatedAt string(date-time) | null
    • isSubstitution boolean | null

      Default value is false.

    • createdAt string(date-time) | null
    • 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
POST /api/assignments/duplicate
curl \
 -X POST https://ppammedellin.com/api/assignments/duplicate \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"date":"string","dates":["string"],"location":{"id":"string"},"keepState":false}'
Request example
{
  "date": "string",
  "dates": [
    "string"
  ],
  "location": {
    "id": "string"
  },
  "keepState": false
}
Response examples (200)
[
  {
    "date": "string",
    "isCaptain": false,
    "isAccepted": true,
    "isEditable": true,
    "id": "string",
    "shift": {
      "id": "string",
      "startTime": "09:42:00+00:00",
      "endTime": "09:42:00+00:00",
      "location": {
        "id": "string",
        "name": "string"
      },
      "dayOfWeek": 42
    },
    "user": {
      "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,
      "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",
      "createdAt": "2024-05-04T09:42:00+00:00",
      "updatedAt": "2024-05-04T09:42:00+00:00"
    },
    "isSubstitution": false,
    "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"
    }
  ]
}