Charter whole or part of a transport - Affrètement
Operations you have to perform to handle chartering.
Tip: it is easier to deal with many transports when you store their Dashdoc uid in you system. Transport uid is given in the reponse of the transport creation endoint.
-
- 1.create the transport with no information about chartering first
- 2.
POST
on/api/v4/transports/
-
- 1.call the charter API to charter the transport or the segment (equivalent for a simple transport)
- 2.
POST
on/api/v4/transports/<transport_uid>/charter/
- 3.or
POST
on/api/v4/segments/charter/?uid__in=<segment_uid>
{
"carrier": {"pk": 123}, // or {"remote_id": "ABC123"}
"instructions": "text"
}
Not possible, use chartering instructions which will be saved in the child transport general instructions.
Cancel the parent transport.
POST
on /api/v4/transports/<transport_uid>/cancel/
This will also cancel all chartered (children) transports.
PATCH
on /api/v4/transports/<transport_uid>/
or
PATCH
on /api/v4/segments/<segment_uid>/
The updated information flows down to the child transport
PATCH
on /api/v4/transports/<transport_uid>/charter/
or
PATCH
on /api/v4/segments/<segment_uid>/charter
with
{
"instructions": "New instructions"
}
Cancel the transport (this will also cancel the child transport) and re-create a new transport, then charter it according to the new transport structure.
If structure is changed on a chartered transport, Dashdoc API returns an error.
- 1.on chartered transport
- 1.
DELETE
on/api/v4/transport/<transport_uid>/charter/
No payload required. This will cancel the child transport. - 2.
POST
on/api/v4/transports/<transports_uid>/charter/
with the new carrier information. This will create a new chartered transport.
- 2.on chartered segment
- 1.
DELETE
on/api/v4/segments/charter/?uid__in=<segment_uid>
No payload required. This will cancel the child transport. - 2.
POST
on/api/v4/segments/charter/?uid__in=<segment_uid>
with the new carrier information. This will create a new chartered transport.
- 1.On chartered transport
- 1.
DELETE
on/api/v4/transport/<transport_uid>/charter/
No payload required. This will cancel the child transport. - 2.Call
POST
on/api/v4/transports/<transport_uid>/assign/
with the id of the trucker.
- 2.On chartered segment
- 1.
DELETE
on/api/v4/segments/charter/?uid__in=<segment_uid>
No payload required. This will cancel the child transport. - 2.Call
PATCH
on/api/v4/segments/<segment_uid>/
with trucker info.
POST
on /api/v4/transports/<transport_uid>/charter/
with the id of the carrier.or
POST
on /api/v4/segments/charter/?uid__in=<segment_uid>
with the id of the carrier.It will unassign your truckers from the chartered segments.
Create a complex transport with 2 segments.
- 1.Call
PATCH
on/api/v4/segments/<segment_1_uid>/
with trucker info - 2.Call
POST
on/api/v4/segments/charter/?uid__in=<segment_2_uid>
with the id of the carrier
Create a complex transport with 2 segments.
- 1.Call
POST
on/api/v4/segments/charter/?uid__in=<segment_1_uid>
with the id of carrier 1 - 2.Call
POST
on/api/v4/segments/charter/?uid__in=<segment_2_uid>
with the id of carrier 2
Create a complex transports where all segments are not assigned to the same carrier and at least two segments are chartered to another carrier.
Example: A→B →C →D where :
- A → B is assigned to a trucker
- B →C and C → D are chartered to another carrier
- 1.call
POST
on/api/v4/segments/charter/?uid__in=uid_B-C,uid_C-D
The API controls that segments are from the same transport and exist in this order.
In this case the number of chartered segments is unlimited and may occur anywhere in the list of segments from the original transport.
Last modified 1yr ago