# BulkShipment - createMaster

## BulkShipment/createMaster

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

Questo endpoint permette di creare una spedizione consolidata.

**Headers**

| Nome      | Descrizione             |
| --------- | ----------------------- |
| x-api-key | Apikey fornita da Gsped |

**Body**

| Nome                       | Tipo   | Obbligatorio | Descrizione                                                                                                                                                                                                |
| -------------------------- | ------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| rcpt\_addr                 | string | Si           | Indirizzo del destinatario                                                                                                                                                                                 |
| rcpt\_country\_code        | string | Si           | Nazione destinatario sigla iso 2 char                                                                                                                                                                      |
| rcpt\_cap                  | string | Si           | CAP del destinatario                                                                                                                                                                                       |
| rcpt\_city                 | string | Si           | Città del destinatario                                                                                                                                                                                     |
| rcpt\_contact              | string | No           | Persona di contatto presso il destinatario                                                                                                                                                                 |
| rcpt\_email                | string | No           | Email del destinatario                                                                                                                                                                                     |
| rcpt\_name                 | string | Si           | Ragione sociale del destinatario                                                                                                                                                                           |
| rcpt\_phone                | string | No           | <p>Numero di telefono del destinatario.<br><br><strong>Obbligatorio per :</strong> <br> - DHL</p>                                                                                                          |
| rcpt\_prov                 | string | No           | Provincia del destinatario                                                                                                                                                                                 |
| sender\_addr               | string | No           | Indirizzo del mittente                                                                                                                                                                                     |
| sender\_country\_code      | string | No           | Nazione mittente sigla iso 2 char                                                                                                                                                                          |
| sender\_cap                | string | No           | CAP del mittente                                                                                                                                                                                           |
| sender\_city               | string | No           | Città del mittente                                                                                                                                                                                         |
| sender\_contact            | string | No           | Persona di contatto presso il mittente                                                                                                                                                                     |
| sender\_email              | string | No           | Email del mittente                                                                                                                                                                                         |
| sender\_name               | string | No           | Ragione sociale del mittente                                                                                                                                                                               |
| sender\_phone              | string | No           | Numero di telefono del mittente                                                                                                                                                                            |
| sender\_prov               | string | No           | Provincia del mittente                                                                                                                                                                                     |
| corriere                   | int    | Si           | Codice identificativo del corriere da utilizzare                                                                                                                                                           |
| servizio                   | int    | Si           | <p>Codice identificativo del servizio.<br><br><strong>Particolarità :</strong><br> <strong>-</strong> Per DHL questo campo deve essere valorizzato a 11, che corrisponde al servizio consolidate (BBX)</p> |
| client\_id                 | int    | Si           | Codice identificativo del anagrafica dove si trova la configurazione specifica del corriere                                                                                                                |
| pallets                    | int    | Si           | Numero di pallets di cui sarà composta la spedizione consolidata                                                                                                                                           |
| ddt\_alpha                 | string | No           | Riferimento alfanumerico                                                                                                                                                                                   |
| ddt\_num                   | int    | No           | Riferimento numerico                                                                                                                                                                                       |
| dati\_pallets              | array  | Si           | Array che contiene i dettagli dei singoli pallet                                                                                                                                                           |
| dati\_pallets.\*.altezza   | int    | No           | Altezza del pallet                                                                                                                                                                                         |
| dati\_pallets.\*.larghezza | int    | Si           | Larghezza del pallet                                                                                                                                                                                       |
| dati\_pallets.\*.lunghezza | int    | Si           | Lunghezza del pallet                                                                                                                                                                                       |
| dati\_pallets.\*.volume    | float  | No           | Volume del pallet                                                                                                                                                                                          |
| date\_req\_ritiro          | string | No           | Data di richiesta di ritiro nel formatto YYYY-MM-DD                                                                                                                                                        |
| opening\_time              | string | No           | Orario in formato HH.MM:SS                                                                                                                                                                                 |
| closing\_time              | string | No           | Orario in formato HH.MM:SS                                                                                                                                                                                 |
| labelType                  | string | No           | <p>Formato delle etichette da richiedere al corriere.<br><br><strong>Valori ammessi :</strong> <br> - ZPL<br> - PDF</p>                                                                                    |
| merce                      | string | Si           | Breve descrizione del contenuto della spedizione.                                                                                                                                                          |
| valuta                     | string | No           | Valuta del valore della merce spedita                                                                                                                                                                      |

**Esempio di richiesta :**&#x20;

```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"
}
```

**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 %}


---

# 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://apidocs.gsped.com/spedizioni-e-dintorni/spedizioni-consolidate/bulkshipment-createmaster.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.
