Unavailability

Create an unavailability for a trailer for a given period

post

A trailer can be marked as unavailable for a given period of time for various reasons. These unavailabilities are marked on the planning or can be accessed by API by fetching the trailer.

Authorizations
AuthenticationstringRequired

Authentication is token based. You can issue a token for your API request from the 'API' section of the settings menu. The token MUST be sent in a Authorization header with each request.

Example of authenticated request

$ curl -X GET -H "Authorization: Token <your token>" "https://api.dashdoc.eu/api/v4/"
Body
remote_idstringOptional

The ID of the unavailability in your system

Example: tr123type1
createdstring Β· date-timeOptional

Date of creation on our server

Example: 2020-07-30T21:10:06.44551Z
start_datestring Β· date-timeOptional

Start date of the unavailability

Example: 2020-07-30T21:10:06.44551Z
end_datestring Β· date-timeOptional

End date of the unavailability

Example: 2020-07-30T21:10:06.44551Z
unavailability_typestring Β· enumOptional

Type of unavailability

Possible values:
unavailability_notestringOptional

Notes about the unavailability

Example: I'm on vacation
Responses
post
/trailers/{pk}/unavailability/
201

Successfully created the unavailability, returns the trailer, which contains the unavailability.

Delete an unavailability for a trailer

delete
Authorizations
AuthenticationstringRequired

Authentication is token based. You can issue a token for your API request from the 'API' section of the settings menu. The token MUST be sent in a Authorization header with each request.

Example of authenticated request

$ curl -X GET -H "Authorization: Token <your token>" "https://api.dashdoc.eu/api/v4/"
Path parameters
pknumberRequired

The trailer's primary key

pk_unavailabilitynumberRequired

The unavailability's primary key

Responses
delete
/trailers/{pk}/unavailability/{pk_unavailability}/
204

Empty body

No content

Partially update an unavailability for a trailer

patch
Authorizations
AuthenticationstringRequired

Authentication is token based. You can issue a token for your API request from the 'API' section of the settings menu. The token MUST be sent in a Authorization header with each request.

Example of authenticated request

$ curl -X GET -H "Authorization: Token <your token>" "https://api.dashdoc.eu/api/v4/"
Path parameters
pknumberRequired

The trailer's primary key

pk_unavailabilitynumberRequired

The unavailability's primary key

Body
remote_idstringOptional

The ID of the unavailability in your system

Example: tr123type1
createdstring Β· date-timeOptional

Date of creation on our server

Example: 2020-07-30T21:10:06.44551Z
start_datestring Β· date-timeOptional

Start date of the unavailability

Example: 2020-07-30T21:10:06.44551Z
end_datestring Β· date-timeOptional

End date of the unavailability

Example: 2020-07-30T21:10:06.44551Z
unavailability_typestring Β· enumOptional

Type of unavailability

Possible values:
unavailability_notestringOptional

Notes about the unavailability

Example: I'm on vacation
Responses
patch
/trailers/{pk}/unavailability/{pk_unavailability}/
200

Successfully updated the unavailability, returns the trailer, which contains the unavailability.

Last updated

Was this helpful?