Create

POST /api/locations/{location_id}/shifts

Create a new shift

Path parameters

  • location_id string Required
application/json

Body Required

  • 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

Responses

  • 201 application/json

    Successful Response

    Hide response attributes Show response 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
  • 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/locations/{location_id}/shifts
curl \
 -X POST https://ppammedellin.com/api/locations/{location_id}/shifts \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"startTime":"09:42:00+00:00","endTime":"09:42:00+00:00","dayOfWeek":42,"seatsCount":42,"isEnabled":true}'
Request example
{
  "startTime": "09:42:00+00:00",
  "endTime": "09:42:00+00:00",
  "dayOfWeek": 42,
  "seatsCount": 42,
  "isEnabled": true
}
Response examples (201)
{
  "startTime": "09:42:00+00:00",
  "endTime": "09:42:00+00:00",
  "dayOfWeek": 42,
  "seatsCount": 42,
  "isEnabled": true,
  "id": "string"
}
Response examples (422)
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}