Create

POST /api/users/{user_id}/availability

Create an availability item

Path parameters

application/json

Body Required

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

      Minimum length is 26, maximum length is 26.

Responses

  • 201 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • id string Required
    • shift object Required
      Hide shift attributes Show shift 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/users/{user_id}/availability
curl \
 -X POST https://metropolitanacolombia.org/api/users/{user_id}/availability \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"shift":{"id":"string"}}'
Request example
{
  "shift": {
    "id": "string"
  }
}
Response examples (201)
{
  "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"
    }
  }
}
Response examples (422)
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}