> For the complete documentation index, see [llms.txt](https://developer.dashdoc.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.dashdoc.com/docs/api-reference/chartering.md).

# Chartering

## Charter many segments

> Shortcut API to create a chartered transport from \*\*one segment\*\* or a \*\*list of successive segments\*\* (from a "parent transport"). Those segments, will be chartered to a "child transport". \
> \
> Child transport is created as follow: \
> \
> \* Shipper is the actual carrier of the parent transport \
> \
> \* Carrier is the chartered carrier given in the \`carrier\` parameter \
> \
> \* Trucker and plates are not set, but information about it can be given in the \`instructions\` parameters \
> \
> \* Other transport data (deliveries, segments, etc.) are duplicated \
> \
> \* Child transport starts at the first segment's origin and ends at the last segment's destination

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Chartering"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"CharterTransport":{"properties":{"carrier":{"$ref":"#/components/schemas/CharterTransport_carrier"},"instructions":{"$ref":"#/components/schemas/global_instructions"},"price":{"$ref":"#/components/schemas/deprecated_price"}},"required":["carrier"],"type":"object"},"CharterTransport_carrier":{"description":"Carrier to whom you wish to charter the transport. Identified either by its `pk` or `remote_id`.","properties":{"pk":{"description":"Dashdoc's internal id. Optional, not required if `remote_id` is sent.","type":"number"},"remote_id":{"description":"Your remote carrier id. Optional, ignored if `pk` is sent.","type":"string"},"carrier_contacts":{"description":"A list containing the uids of each contact in the carrier's company to link to this transport.","items":{"type":"string"},"type":"array"}},"type":"object"},"global_instructions":{"description":"Operating instructions. The carrier, the shipper and the creator of the transport have access to those instructions. However, the creator is the only who has the right to edit.","maxLength":1000,"type":"string"},"deprecated_price":{"deprecated":true,"description":"Full price for the transport","format":"float","nullable":true,"type":"number"},"inline_response_201_1":{"properties":{"child_transport":{"description":"uid of the chartered transport that has been created","type":"string"}},"type":"object"},"CharterSegmentsFiltersError":{"properties":{"non_field_errors":{"$ref":"#/components/schemas/CharterSegmentsFiltersError_non_field_errors"}},"type":"object"},"CharterSegmentsFiltersError_non_field_errors":{"properties":{"code":{"items":{"type":"string"},"type":"array"},"detail":{"items":{"type":"string"},"type":"array"}},"type":"object"}}},"paths":{"/segments/charter/":{"post":{"description":"Shortcut API to create a chartered transport from **one segment** or a **list of successive segments** (from a \"parent transport\"). Those segments, will be chartered to a \"child transport\". \n\nChild transport is created as follow: \n\n* Shipper is the actual carrier of the parent transport \n\n* Carrier is the chartered carrier given in the `carrier` parameter \n\n* Trucker and plates are not set, but information about it can be given in the `instructions` parameters \n\n* Other transport data (deliveries, segments, etc.) are duplicated \n\n* Child transport starts at the first segment's origin and ends at the last segment's destination","operationId":"charterManySegments","parameters":[{"description":"Comma separated list of segment uids, or just one if only one segment is to be chartered.","in":"query","name":"uid__in","required":false,"schema":{"type":"string"}},{"description":"Comma separated list of remote ids, or just one if only one segment is to be chartered. Can be used to identify segments using their `remote_id` instead of their `uid`.","in":"query","name":"remote_id__in","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharterTransport"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_201_1"}}},"description":"Segments chartered successfully"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharterSegmentsFiltersError"}}},"description":"missing or incorrect query parameters"}},"summary":"Charter many segments","tags":["Chartering"]}}}}
````

## Charter transport

> Shortcut API to create a chartered transport. Current transport, called "parent transport" will be chartered to a "child transport". \
> \
> Child transport is created as follow: \
> \
> \* Shipper is the actual carrier of the parent transport \
> \
> \* Carrier is the chartered carrier given in the \`carrier\` parameter \
> \
> \* Trucker and plates are not set, but information about it can be given in the \`instructions\` parameters \
> \
> \* Other transport data (deliveries, segments, etc.) are duplicated \
> \
> \* Child transport starts at the first segment's origin and ends at the last segment's destination

````json
{"openapi":"3.0.0","info":{"title":"Dashdoc public API","version":"4.0"},"tags":[{"name":"Chartering"}],"servers":[{"description":"Production","url":"https://api.dashdoc.eu/api/v4"},{"description":"Sandbox","url":"https://sandbox.dashdoc.eu/api/v4"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Authentication is token based. You can issue a token for your API request from the ['API' section of the settings](http://dashdoc.eu/app/settings/api/) menu. The token MUST be sent in a `Authorization` header with each request.\n\n\n**Example of authenticated request**\n```\n$ curl -X GET -H \"Authorization: Token <your token>\" \"https://api.dashdoc.eu/api/v4/\"\n```\n","in":"header","name":"Authentication","type":"apiKey"}},"schemas":{"CharterTransport":{"properties":{"carrier":{"$ref":"#/components/schemas/CharterTransport_carrier"},"instructions":{"$ref":"#/components/schemas/global_instructions"},"price":{"$ref":"#/components/schemas/deprecated_price"}},"required":["carrier"],"type":"object"},"CharterTransport_carrier":{"description":"Carrier to whom you wish to charter the transport. Identified either by its `pk` or `remote_id`.","properties":{"pk":{"description":"Dashdoc's internal id. Optional, not required if `remote_id` is sent.","type":"number"},"remote_id":{"description":"Your remote carrier id. Optional, ignored if `pk` is sent.","type":"string"},"carrier_contacts":{"description":"A list containing the uids of each contact in the carrier's company to link to this transport.","items":{"type":"string"},"type":"array"}},"type":"object"},"global_instructions":{"description":"Operating instructions. The carrier, the shipper and the creator of the transport have access to those instructions. However, the creator is the only who has the right to edit.","maxLength":1000,"type":"string"},"deprecated_price":{"deprecated":true,"description":"Full price for the transport","format":"float","nullable":true,"type":"number"},"inline_response_201_1":{"properties":{"child_transport":{"description":"uid of the chartered transport that has been created","type":"string"}},"type":"object"}}},"paths":{"/transports/{uid}/charter/":{"post":{"description":"Shortcut API to create a chartered transport. Current transport, called \"parent transport\" will be chartered to a \"child transport\". \n\nChild transport is created as follow: \n\n* Shipper is the actual carrier of the parent transport \n\n* Carrier is the chartered carrier given in the `carrier` parameter \n\n* Trucker and plates are not set, but information about it can be given in the `instructions` parameters \n\n* Other transport data (deliveries, segments, etc.) are duplicated \n\n* Child transport starts at the first segment's origin and ends at the last segment's destination","operationId":"charterTransports","parameters":[{"description":"The transport's `uid`","in":"path","name":"uid","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharterTransport"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_201_1"}}},"description":"Transport chartered successfully"}},"summary":"Charter transport","tags":["Chartering"]}}}}
````
