Unavailability

Create an unavailability for a vehicle for a given period

post

A vehicle 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 vehicle.

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
/vehicles/{pk}/unavailability/
201

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

Delete an unavailability for a vehicle

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 vehicle's primary key

pk_unavailabilitynumberRequired

The unavailability's primary key

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

Empty body

No content

Partially update an unavailability for a vehicle

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 vehicle'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
chevron-right
200

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

application/json
pknumberOptional

Dashdoc's internal id

Example: 928
carriernumberOptional

Dashdoc's internal id of the carrier owning the vehicle

Example: 928
categorystringOptional

Vehicle category

Example: tipper_cereal
license_platestringOptional

License plate number

Example: WE749RM
fleet_numberstringOptional

Your vehicle fleet number

Example: TRUCK120
remote_idstringOptional

The ID of the vehicle in your system

Example: tr123type1
createdstring Β· date-timeOptional

Date of creation on our server

Example: 2020-07-30T21:10:06.44551Z
used_for_qualimat_transportsbooleanOptional

True if the vehicle can be used for Qualimat transport (only used for visual help and warnings)

telematic_vehiclenumberOptional

Ignore. Dashdoc technical data

originalnumberOptionalExample: 40
technical_control_deadlinestring Β· date-timeOptionalExample: 2020-12-22T15:31:39.26167Z
tachograph_deadlinestring Β· date-timeOptionalExample: 2020-12-22T15:31:39.26167Z
speed_limiter_deadlinestring Β· date-timeOptionalExample: 2020-12-22T15:31:39.26167Z
countrystringOptional

Only the 2-character codification is accepted (ISO 3166-1 alpha-2)

Example: FR
eventsobject[]Optional

Ignore. Dashdoc technical data.

patch
/vehicles/{pk}/unavailability/{pk_unavailability}/
200

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

Last updated

Was this helpful?