> For the complete documentation index, see [llms.txt](https://apidocs.gsped.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/spedizioni-consolidate/bulkshipment-createmaster.md).

# BulkShipment - createMaster

## BulkShipment/createMaster

<mark style="color:green;">`POST`</mark> <https://api.gsped.it/\\[INSTANCE]/BulkShipment/createMaster>

This endpoint lets you create a consolidated shipment.

**Headers**

| Name      | Description              |
| --------- | ------------------------ |
| x-api-key | Apikey provided by Gsped |

**Body**

| Name                       | Type   | Required | Description                                                                                                                                                                                       |
| -------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| rcpt\_addr                 | string | Yes      | Recipient address                                                                                                                                                                                 |
| rcpt\_country\_code        | string | Yes      | Recipient country, 2-char ISO code                                                                                                                                                                |
| rcpt\_cap                  | string | Yes      | Recipient postcode                                                                                                                                                                                |
| rcpt\_city                 | string | Yes      | Recipient city                                                                                                                                                                                    |
| rcpt\_contact              | string | No       | Contact person at the recipient                                                                                                                                                                   |
| rcpt\_email                | string | No       | Recipient email                                                                                                                                                                                   |
| rcpt\_name                 | string | Yes      | Recipient company name                                                                                                                                                                            |
| rcpt\_phone                | string | No       | <p>Recipient phone number.<br><br><strong>Required for:</strong><br>- DHL</p>                                                                                                                     |
| rcpt\_prov                 | string | No       | Recipient province                                                                                                                                                                                |
| sender\_addr               | string | No       | Sender address                                                                                                                                                                                    |
| sender\_country\_code      | string | No       | Sender country, 2-char ISO code                                                                                                                                                                   |
| sender\_cap                | string | No       | Sender postcode                                                                                                                                                                                   |
| sender\_city               | string | No       | Sender city                                                                                                                                                                                       |
| sender\_contact            | string | No       | Contact person at the sender                                                                                                                                                                      |
| sender\_email              | string | No       | Sender email                                                                                                                                                                                      |
| sender\_name               | string | No       | Sender company name                                                                                                                                                                               |
| sender\_phone              | string | No       | Sender phone number                                                                                                                                                                               |
| sender\_prov               | string | No       | Sender province                                                                                                                                                                                   |
| corriere                   | int    | Yes      | Identification code of the courier to use                                                                                                                                                         |
| servizio                   | int    | Yes      | <p>Identification code of the service.<br><br><strong>Special cases:</strong><br><strong>-</strong> For DHL this field must be set to 11, which corresponds to the consolidated service (BBX)</p> |
| client\_id                 | int    | Yes      | Identification code of the client account holding the courier-specific configuration                                                                                                              |
| pallets                    | int    | Yes      | Number of pallets the consolidated shipment will consist of                                                                                                                                       |
| ddt\_alpha                 | string | No       | Alphanumeric reference                                                                                                                                                                            |
| ddt\_num                   | int    | No       | Numeric reference                                                                                                                                                                                 |
| dati\_pallets              | array  | Yes      | Array containing the details of each pallet                                                                                                                                                       |
| dati\_pallets.\*.altezza   | int    | No       | Pallet height                                                                                                                                                                                     |
| dati\_pallets.\*.larghezza | int    | Yes      | Pallet width                                                                                                                                                                                      |
| dati\_pallets.\*.lunghezza | int    | Yes      | Pallet length                                                                                                                                                                                     |
| dati\_pallets.\*.volume    | float  | No       | Pallet volume                                                                                                                                                                                     |
| date\_req\_ritiro          | string | No       | Requested pickup date in YYYY-MM-DD format                                                                                                                                                        |
| opening\_time              | string | No       | Time in HH.MM:SS format                                                                                                                                                                           |
| closing\_time              | string | No       | Time in HH.MM:SS format                                                                                                                                                                           |
| labelType                  | string | No       | <p>Format of the labels to request from the courier.<br><br><strong>Allowed values:</strong><br>- ZPL<br>- PDF</p>                                                                                |
| merce                      | string | Yes      | Short description of the shipment contents.                                                                                                                                                       |
| valuta                     | string | No       | Currency of the value of the goods shipped                                                                                                                                                        |
| uploadDocAfterwards        | bool   | No       | Indicates that you want to upload the documents for the consolidated shipment being created at a later time                                                                                       |
| addebito\_dogana           | int    | No       | <p>Allowed values:<br>1 --> Charged to the sender<br>2 --> Charged to a third party<br><br><strong>Required for:</strong><br>- DHL</p>                                                            |
| iorAccount                 | string | No       | Importer customer code                                                                                                                                                                            |
| iorCountryCode             | string | No       | Country where the importer customer code is registered                                                                                                                                            |

{% hint style="info" %}
**WARNING:**

The destination address of the consolidated shipment should be the courier's HUB in the destination country.

In the case of DHL, the courier informs us of the following:

***The recipient of the mother shipment must be provided by DHL (it is our customs entry point for the country)***

***If the sales representative does not know it, they must ask the DHL COG Italy department.***
{% endhint %}

**Request example:**

```json
{
    "rcpt_addr": "Franklin House, 19 Crown Rd",
    "rcpt_cap": "EN1 1TH",
    "rcpt_city": "Enfield",
    "rcpt_contact": "DHL HUB GB",
    "rcpt_country_code": "GB",
    "rcpt_email": "test@gsped.com",
    "rcpt_name": "DHL HUB GB",
    "rcpt_phone": "+391231231234",
    "rcpt_prov": "VA",
    "client_id": 999,
    "corriere": 104,
    "servizio": 11,
    "pallets": 2,
    "dati_pallets": [
        {
            "larghezza": 120,
            "lunghezza": 80
        },
        {
            "larghezza": 120,
            "lunghezza": 80
        }
    ],
    "merce": "Fashion articles",
    "uploadDocAfterwards": true
}
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "id": "1548765",
    "num_spedizione": "3026253101",
    "dati_pallets": [
        {
            "palletID": "JD014600005286153047",
            "larghezza": "120",
            "lunghezza": "80"
        },
        {
            "palletID": "JD014600005286153048",
            "larghezza": "120",
            "lunghezza": "80"
        }
    ]
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "errore": "The pallets field is required."
}
```

{% endtab %}
{% endtabs %}
