application/json

Body

Request for creating/updating a new holiday

  • name string Required

    Name

  • startAt string Required

    Start date

  • endAt string Required

    End date

Responses

  • 200 application/json

    successful operation

    Hide response attributes Show response attributes object
    • id string Required

      id

    • companyId string Required

      Company ID

    • name string Required

      Name

    • startAt string(date) Required

      Start At

    • endAt string(date) Required

      End At

    • createdAt string(date-time) Required

      Created at date

  • 403 application/json

    Not authorized

    Hide response attributes Show response attributes object

    Error schema

    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

  • 422 application/json

    Validation error

    Hide response attributes Show response attributes object
    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

POST /v1/holidays/
curl \
 --request POST 'https://localhost/v1/holidays/' \
 --header "Content-Type: application/json" \
 --data '{"name":"Christmas","startAt":"2023-12-25","endAt":"2023-12-25"}'
Request examples
{
  "name": "Christmas",
  "startAt": "2023-12-25",
  "endAt": "2023-12-25"
}
Response examples (200)
{
  "id": "hol_xxxxxxxxxxx",
  "companyId": "co_123123123123",
  "name": "Christmas",
  "startAt": "2023-12-25",
  "endAt": "2023-12-25",
  "createdAt": "2023-12-05 14:30:41"
}
Response examples (403)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}
Response examples (422)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}