# Create a multi-deliveries transport as a carrier

### **Specificity for Multi-deliveries transport :**

#### Deliveries

The `deliveries` object is an array. You need to include as many `deliveries` as you have loading-unloading point pairs. Each delivery represents one loading point and its corresponding unloading point.

#### Segments

The segments represent the truck's route. They allow you to define the sequence of activities for each step of the journey.

> For example, you have 2 deliveries:
>
> * A -> B
> * C -> D
>
> If you want to complete all the pickups first and then all the deliveries, starting with B, you should use the following segments:
>
> 1. A -> C
> 2. C -> B
> 3. B -> D
>
> This way, it specifies that the truck will start with pickup A, followed by pickup C, and then proceed to deliveries B and D.

{% hint style="danger" %}
**Special Process for Deliveries Sharing the Same Activity**
{% endhint %}

When multiple deliveries share the same activity, these similar activities must be differentiated by a unique `remote_id`.

> For example, you have 2 deliveries:
>
> * A -> B
> * A -> C
>
> You need to differential both A activities, meaning that you have A and A'
>
> If you want to complete pickup first and then all the deliveries, starting with B, you should use the following segments:
>
> 1. A -> A'
> 2. A'-> B
> 3. B -> C
>
> This way, it specifies that the truck will start with pickup A, then proceed to deliveries B and D.

In this example, remote ID is used for each activity because both deliveries have the same pickup site

```
{
    "carrier_address": {
        "company": {
            "pk": "YOUR_COMPANY_PK"
        }
    },
    "segments": [
        {
            "origin": {
                "remote_id": "C1",
                "address": {
                    "city": "Loading city",
                    "name": "Loading company",
                    "address": "Loading address",
                    "company": {
                        "country": "FR",
                        "name": "Loading company"
                    },
                    "country": "FR",
                    "postcode": "12345"
                },
                "instructions": "instructions publiques"
            },
            "destination": {
                "remote_id": "C2",
                "address": {
                    "city": "Loading city",
                    "name": "Loading company",
                    "address": "Loading address",
                    "company": {
                        "country": "FR",
                        "name": "Loading company"
                    },
                    "country": "FR",
                    "postcode": "12345"
                },
                "instructions": "instructions publiques"
            }
        },
        {
            "origin": {
                "remote_id": "C2",
                "address": {
                    "city": "Loading city",
                    "name": "Loading company",
                    "address": "Loading address",
                    "company": {
                        "country": "FR",
                        "name": "Loading company"
                    },
                    "country": "FR",
                    "postcode": "12345"
                },
                "instructions": "instructions publiques"
            },
            "destination": {
                "remote_id": "L1",
                "address": {
                    "city": "Unloading city",
                    "name": "Unloading company",
                    "address": "Unloading address",
                    "company": {
                        "country": "FR",
                        "name": "Unloading company"
                    },
                    "country": "FR",
                    "postcode": "12345"
                },
                "instructions": "",
                "trucker_instructions": ""
            }
        },
        {
            "origin": {
                "remote_id": "L1",
                "address": {
                    "city": "Unloading city",
                    "name": "Unloading company",
                    "address": "Unloading address",
                    "company": {
                        "country": "FR",
                        "name": "Unloading company"
                    },
                    "country": "FR",
                    "postcode": "12345"
                },
                "instructions": "",
                "trucker_instructions": ""
            },
            "destination": {
                "remote_id": "L2",
                "address": {
                    "city": "Unloading city",
                    "name": "Unloading company",
                    "address": "Unloading address",
                    "company": {
                        "country": "FR",
                        "name": "Unloading company"
                    },
                    "country": "FR",
                    "postcode": "12345"
                },
                "instructions": "",
                "trucker_instructions": ""
            }
        }
    ],
    "deliveries": [
        {
            "origin": {
                "remote_id": "C1",
                "address": {
                    "city": "Loading city",
                    "name": "Loading company",
                    "address": "Loading address",
                    "company": {
                        "country": "FR",
                        "name": "Loading company"
                    },
                    "country": "FR",
                    "postcode": "12345"
                },
                "instructions": "",
                "trucker_instructions": ""
            },
            "destination": {
                "remote_id": "L1",
                "address": {
                    "city": "Unloading city",
                    "name": "Unloading company",
                    "address": "Unloading address",
                    "company": {
                        "country": "FR",
                        "name": "Unloading company"
                    },
                    "country": "FR",
                    "postcode": "12345"
                },
                "instructions": "",
                "trucker_instructions": ""
            },
            "planned_loads": [
                {
                    "weight": 30,
                    "category": "bulk",
                    "quantity": null,
                    "description": "Sable"
                }
            ],
            "multiple_rounds": false,
            "shipper_address": {
                "company": {
                    "pk": "YOUR_SHIPPER_PK"
                }
            }
        },
        {
            "origin": {
                "remote_id": "C2",
                "address": {
                    "city": "Loading city",
                    "name": "Loading company",
                    "address": "Loading address",
                    "company": {
                        "country": "FR",
                        "name": "Loading company"
                    },
                    "country": "FR",
                    "postcode": "12345"
                },
                "reference": "",
                "instructions": "",
                "trucker_instructions": ""
            },
            "destination": {
                "remote_id": "L2",
                "address": {
                    "city": "Unloading city",
                    "name": "Unloading company",
                    "address": "Unloading address",
                    "company": {
                        "country": "FR",
                        "name": "Unloading company"
                    },
                    "country": "FR",
                    "postcode": "12345"
                },
                "reference": "",
                "instructions": "",
                "trucker_instructions": ""
            },
            "planned_loads": [
                {
                    "weight": 45,
                    "category": "bulk",
                    "quantity": null,
                    "description": "Gravier"
                }
            ],
            "shipper_address": {
                "company": {
                    "pk": "YOUR_SHIPPER_PK"
                }
            },
        }
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.dashdoc.com/docs/use-cases-and-tutorials/carriers/create-a-multi-deliveries-transport-as-a-carrier.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
