Skip to content

Create

POST

/:tenantId/appointment-types

Body

json
{
    "name": "Check up",
    "is_default": 0,
    "color": "#973544",
    "status": 1
}
KeyTypeRequiredDescription
namestringyesThe name of the appointment type.
is_defaultintegernoIndicates if it's the default type
0: No (default)
1: Yes
colorstringnoThe color associated with the appointment type.
statusintegernoThe status of the appointment type
0: Inactive
1: Active (default)

Response

HTTP 200 OK

json
{
  "data": {
    "id": 335,
    "name": "Check up",
    "status": 1,
    "is_default": false,
    "color": "#973544",
    "deleted_at": null,
    "created_at": "2024-11-29T06:14:12.000000Z",
    "updated_at": "2024-11-29T06:14:12.000000Z"
  }
}

HTTP 422 Unprocessable Content

json
{
  "message": "The name field is required.",
  "errors": {
    "name": [
      "The name field is required."
    ]
  }
}