Availability
Declare an unavailability
Declares that a resource is not available in a window: holidays, a maintenance, a closure.
availability:writeResult
generated from the schema
reason is ACCEPTED and not returned: it stays in Filmo for whoever has access. For a person or a vehicle, overlapping commitments do not block: the unavailability is recorded and warningCount says how many already reserved commitments overlap with it. A space is different: declaring it unavailable in a window where it is booked responds 409 conflict and nothing is written, so on a space warningCount is always 0. It also responds 409 if an identical unavailability already exists (same resource, window, state, type and reason). It responds 400 validation_error, with errors[0]. on the field, when endDate is not after startDate, when resourceId does not exist or belongs to another account, and when absenceType is not one of its resource type: vacation, sick, personal, training or other for staff; maintenance, inspection, repair, reserved or other for vehicles; academic, maintenance, event, closure or other for spaces. On a space it responds 503 service_unavailable while space unavailabilities are switched off for the account.
Arguments
Which resource is declared unavailable.
Available options: staff, vehicle, space
Identifier of that resource.
Limits: min length 1
Start, in ISO 8601 with offset.
End, in ISO 8601 with offset.
What is declared for that window.
Available options: available, unavailable, unknown
Absence type.
Available options: vacation, sick, personal, training, maintenance, inspection, repair, reserved, academic, event, closure, other
Reason. Stored in Filmo and NOT returned by the API.
Limits: max length 500
Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure.
Limits: min length 1, max length 255
Result
On success the result carries structuredContent with data and meta. These are the attributes of data.
Show the attributes of data
The unavailability as it now stands.
Show child attributesHide child attributes
Unique identifier of the unavailability.
Which resource: staff, vehicle or space.
Identifier of that resource.
Resource name; null if not recorded.
Start of the unavailability in ISO 8601 UTC.
End of the unavailability in ISO 8601 UTC.
Declared state. This list only returns unavailable windows that have not ended yet, so it is always unavailable here; available and unknown exist as declarations but are not listed.
Absence type. Only emitted for vehicles and spaces, where it is operational; for staff it is health data and is returned as null.
Last modification in ISO 8601 UTC; null if not recorded.
Commitments of the resource that overlap this unavailability.
An error is a result with isError: true and the problem in content[0].; there is no structuredContent. See Errors.
The same operation by REST
This tool runs POST /api/v1/availability/unavailabilities.
Related pages
Link to this section: Related pagesAvailability
Declare an unavailability
Declares that a resource is not available in a window: holidays, a maintenance, a closure.
Guides
Safe writes
An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.
Guides
Errors
A tool error is a result with
isError: trueand the problem in the first text block. Branch on itscode.
Was this page helpful?