Create Company Closure

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 the start_datetime_utc and end_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 the start_datetime_utc and end_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, the start_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" } ```
Log in to see full request history
timestatususer agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Company ID

Body Params
string
required

Type of the closure

string
required

Name of the closure

string
required

Description of the closure

date-time
required

Start datetime of the closure in UTC

date-time
required

End datetime of the closure in UTC

company_ids_to_exclude
array of int32s

List of company IDs to exclude from this closure

company_ids_to_exclude
Responses

422

Unprocessable Entity

Language
Credentials
URL
Click Try It! to start a request and see the response here! Or choose an example:
application/json