Create

POST /api/locations/{location_id}/shifts

Create a new shift

Path parameters

application/json

Body Required

Responses

  • 201 application/json

    Successful Response

    Hide response attributes Show response attributes object
  • 422 application/json

    Validation Error

    Hide response attribute Show response attribute object
    • detail array[object]
      Hide detail attributes Show detail attributes object
POST /api/locations/{location_id}/shifts
curl \
 -X POST https://metropolitanacolombia.org/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"
    }
  ]
}