post https://{api_url}/api/v5/admin//company_closures
Creates a new company closure.
Understanding Closure Types:
There are two types of company closures:
- absolute_time: This type represents a closure spanning a specific moment in time globally. When creating an
absolute_time
closure, ensure thestart_datetime_utc
andend_datetime_utc
parameters reflect the UTC equivalent of the desired local times. - relative_time: This type represents a closure spanning a time relative to each user's local time. When creating a
relative_time
closure, provide thestart_datetime_utc
andend_datetime_utc
as if they were UTC, effectively ignoring timezone information.
Payload Examples:
absolute_time Example:
For example, if a user selects December 25th, 2024, 9:30 AM IST, thestart_datetime_utc
should be "2024-12-25T04:00:00.000Z"
{
"type": "absolute_time",
"name": "Company Wide Meeting",
"description": "Company will be closed for a meeting.",
"start_datetime_utc": "2024-12-25T04:00:00.000Z",
"end_datetime_utc": "2024-12-26T12:30:00.000Z"
}
**relative_time Example:**
For example, if a user selects December 25th, 2024, 9:30 AM IST, the `start_datetime_utc` should be "2024-12-25T09:30:00.000Z" ```json { "type": "relative_time", "name": "Christmas Break", "description": "Company Closure due to Christmas break period.", "start_datetime_utc": "2024-12-25T09:30:00.000Z", "end_datetime_utc": "2024-12-26T18:00:00.000Z" } ```