create_leave_period
Declare a leave period for a user to record holidays or absences. Specify start and end dates, half-days, and optionally delete existing time declarations.
Instructions
Declare a leave period (days off) for a user, the current one by default. Use it for holidays and absences; use update_leave_period to move one and list_leave_periods to check existing ones first. Half days are expressed with start_type and end_type: a single afternoon off is the same day twice, pm to pm. Gryzzly refuses a leave over days that already carry time unless delete_declarations is true, which deletes that time irreversibly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | Whose leave it is, by name, email or id. Defaults to the current user. | |
| end_at | No | Last day off. Defaults to `start_at`, which is one day off. | |
| end_type | No | How much of the last day is off. Defaults to `full`. | |
| start_at | Yes | First day off. | |
| start_type | No | How much of the first day is off. Defaults to `full`. | |
| description | No | Why the person is away. | |
| delete_declarations | No | Delete the declarations already made over those days. Defaults to false, which makes Gryzzly refuse the leave when time is already declared. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The leave period's identifier. | |
| end_at | No | The last day of the leave. | |
| user_id | No | The user on leave. | |
| end_type | No | `full`, `am` or `pm`. | |
| start_at | No | The first day of the leave. | |
| edited_by | No | Who last edited the leave period. | |
| created_at | No | When the leave period was created. | |
| start_type | No | `full`, `am` or `pm`. | |
| updated_at | No | When the leave period was last updated. | |
| description | No | Why the person is away. |