Unavailability

Create an unavailability for a trucker for a given period

post

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

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

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

Delete an unavailability for a trucker

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

pk_unavailabilitynumberRequired

The unavailability's primary key

Responses
delete
/manager-truckers/{pk}/unavailability/{pk_unavailability}/
204

Empty body

No content

Partially update an unavailability for a trucker

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 trucker'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 trucker, which contains the unavailability.

application/json
pknumberOptional

Dashdoc's internal id.

Example: 23498
phone_numberstringOptional
invite_codestringOptional

Invite code trucker needs to connect to mobile app. The code is generated by Dashdoc.

app_versionnumberOptional

Ignore. Dashdoc technical data.

Example: 180
readable_app_versionstringOptional

Ignore. Dashdoc technical data.

Example: 2.7.7
platformstringOptional

Ignore. Dashdoc technical data.

Example: ios
remote_idstringOptional

The ID of the trucker in your system. It has to be unique among all your truckers.

is_rentedbooleanOptional
phone_number_personalstringOptionalExample: 0601020304
addressstringOptionalExample: A random address 4 square Dashdoc
postcodestringOptionalExample: 44000
citystringOptionalExample: Nantes
country_codestringOptional

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

Example: FR
driving_license_numberstringOptionalExample: 99 999 999
driving_license_deadlinestring · date-timeOptionalExample: 2020-12-22T15:31:39.26167Z
adr_license_deadlinestring · date-timeOptionalExample: 2020-12-22T15:31:39.26167Z
carrist_license_deadlinestring · date-timeOptionalExample: 2020-12-22T15:31:39.26167Z
occupational_health_visit_deadlinestring · date-timeOptionalExample: 2020-12-22T15:31:39.26167Z
new_app_update_availablebooleanOptional

Ignore. Dashdoc technical data.

eventsobject[]Optional

Ignore. Dashdoc technical data.

patch
/manager-truckers/{pk}/unavailability/{pk_unavailability}/
200

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

Last updated

Was this helpful?