For the complete documentation index, see llms.txt. This page is also available as Markdown.

_save

Creates or edits an Availability.

Parameters

id

The ID of the Availability. This parameter is not used if creating a new Availability.

obj_type

The sort of object which this Availability will affect, being a Company, Department, Role or User.

  • company

  • department

  • role

  • user

event_type

The type of event in relation to the Availability, can be one of the following:

  • absence

  • annual_leave

  • sick_leave

  • unpaid_leave

  • public_holiday

  • company_holiday

  • unavailable

  • available_override

availability

Whether this counts as a period of Availability or Unavailability. (0=Unavailable, 1=Available)

status

The Status of the Availability: 0 = Pending 1 = Approved 2 = Rejected 3 = Cancelled

name

The name of this Availability.

start_e

An epoch time format of the start date for this Availability.

end_e

An epoch time format of the end date for this Availability.

all_day

Whether the Availability counts as all day or not. (0 = No, 1 = Yes)

Whether the Availability will be paid time or not. (0 = No, 1 = Yes)

notes

The notes which will be set for this Availability.

obj_id

The ID of the object in relation to the "obj_type" parameter, e.g a User's ID.

Example

Result

On Failure

If the "id" parameter is set but does not match an existing Availability:

If the target set by "obj_type" and "obj_id" does not exist:

Last updated