# [EXPERIMENTAL] Create TransportResource Unavailability This endpoint allows you to create an Unavailability with a generated ID. This can be used for _ad hoc_ Unavailabilities or situations where the source system does not contain any unique IDs. See the PUT operation for more information on the functional impact of adding a new unavailability. Endpoint: POST /transport-resource/{business_id}/unavailability Version: 1.27.2 Security: clientCredentials ## Path parameters: - `business_id` (string, required) A unique identifier of an entity instance. Should only contain characters which do not need URL encoding. ## Header parameters: - `Prefer` (array) The RFC7240 Prefer header indicates that a particular server behavior is preferred by the client but is not required for successful completion of the request (see RFC 7240). The following behavior (see _Examples_) is supported by this API: * return= is used to suggest the server to return using 204 without resource (minimal) or using 200 or 201 with resource (representation) in the response body on success. ## Request fields (application/json): - `from` (string, required) Example: "2021-01-01T06:00:00Z" - `to` (string, required) must be strictly greater than from Example: "2021-01-10T06:00:00Z" - `description` (string) Example: "maintenance" ## Response 201 fields (application/json): - `id` (string) The unique Unavailability ID. - `transport_resource_id` (string) The TransportResource that has this Unavailability. - `from` (string, required) Example: "2021-01-01T06:00:00Z" - `to` (string, required) must be strictly greater than from Example: "2021-01-10T06:00:00Z" - `description` (string) Example: "maintenance" ## Response 400 fields (application/problem+json): - `title` (string) A short, summary of the problem. Example: "Validation exception" - `detail` (string) A detailed explanation specific to this problem. Example: "The field contains invalid business formatting." - `violations` (array) - `violations.field` (string) Example: "path.to.field" - `violations.message` (string) Example: "Field is required" ## Response 404 fields (application/problem+json): - `title` (string) A short, summary of the problem. Example: "Validation exception" - `detail` (string) A detailed explanation specific to this problem. Example: "The field contains invalid business formatting." ## Response 204 fields ## Response 401 fields