Unavailability
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.
The ID of the unavailability in your system
tr123type1
Date of creation on our server
2020-07-30T21:10:06.44551Z
Start date of the unavailability
2020-07-30T21:10:06.44551Z
End date of the unavailability
2020-07-30T21:10:06.44551Z
Type of unavailability
Notes about the unavailability
I'm on vacation
POST /api/v4/trailers/{pk}/unavailability/ HTTP/1.1
Host: api.dashdoc.eu
Authentication: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 225
{
"remote_id": "tr123type1",
"created": "2020-07-30T21:10:06.44551Z",
"start_date": "2020-07-30T21:10:06.44551Z",
"end_date": "2020-07-30T21:10:06.44551Z",
"unavailability_type": "paid_vacation",
"unavailability_note": "I'm on vacation"
}
Successfully created the unavailability, returns the trailer, which contains the unavailability.
{
"pk": 928,
"original": 1,
"carrier": 928,
"license_plate": "WE749RM",
"fleet_number": "TRAILER120",
"remote_id": "tr123type1",
"created": "2020-07-30T21:10:06.44551Z",
"used_for_qualimat_transports": true,
"tags": [
{
"pk": 23498,
"name": "Remorque"
}
],
"technical_control_deadline": "2020-12-22T15:31:39.26167Z",
"country": "FR",
"unavailability": [
{
"id": 928,
"remote_id": "tr123type1",
"created": "2020-07-30T21:10:06.44551Z",
"start_date": "2020-07-30T21:10:06.44551Z",
"end_date": "2020-07-30T21:10:06.44551Z",
"unavailability_type": "paid_vacation",
"unavailability_note": "I'm on vacation"
}
],
"events": [
{}
]
}
The trailer's primary key
The unavailability's primary key
DELETE /api/v4/trailers/{pk}/unavailability/{pk_unavailability}/ HTTP/1.1
Host: api.dashdoc.eu
Authentication: YOUR_API_KEY
Accept: */*
Empty body
No content
The trailer's primary key
The unavailability's primary key
The ID of the unavailability in your system
tr123type1
Date of creation on our server
2020-07-30T21:10:06.44551Z
Start date of the unavailability
2020-07-30T21:10:06.44551Z
End date of the unavailability
2020-07-30T21:10:06.44551Z
Type of unavailability
Notes about the unavailability
I'm on vacation
PATCH /api/v4/trailers/{pk}/unavailability/{pk_unavailability}/ HTTP/1.1
Host: api.dashdoc.eu
Authentication: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 225
{
"remote_id": "tr123type1",
"created": "2020-07-30T21:10:06.44551Z",
"start_date": "2020-07-30T21:10:06.44551Z",
"end_date": "2020-07-30T21:10:06.44551Z",
"unavailability_type": "paid_vacation",
"unavailability_note": "I'm on vacation"
}
Successfully updated the unavailability, returns the trailer, which contains the unavailability.
{
"pk": 928,
"original": 1,
"carrier": 928,
"license_plate": "WE749RM",
"fleet_number": "TRAILER120",
"remote_id": "tr123type1",
"created": "2020-07-30T21:10:06.44551Z",
"used_for_qualimat_transports": true,
"tags": [
{
"pk": 23498,
"name": "Remorque"
}
],
"technical_control_deadline": "2020-12-22T15:31:39.26167Z",
"country": "FR",
"unavailability": [
{
"id": 928,
"remote_id": "tr123type1",
"created": "2020-07-30T21:10:06.44551Z",
"start_date": "2020-07-30T21:10:06.44551Z",
"end_date": "2020-07-30T21:10:06.44551Z",
"unavailability_type": "paid_vacation",
"unavailability_note": "I'm on vacation"
}
],
"events": [
{}
]
}
Last updated
Was this helpful?