> 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-closemaster.md).

# BulkShipment - closeMaster

## BulkShipment/closeMaster

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

This endpoint **finalises** the consolidated shipment, confirming that its composition is **final** and that **no** further **changes** or **additions** are allowed.

**Headers**

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

**Body**

| Name | Type | Required | Description                                                   |
| ---- | ---- | -------- | ------------------------------------------------------------- |
| id   | int  | Yes      | ID of the consolidated shipment, obtained when it was created |

**Request example**

```json
{
    "id": 659
}
```

**Response**

In addition to the labels to use on the pallets, the response contains a summary of the consolidated shipment data (it is the same response you would get from Shipment - POST).

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

```json
{
    "client_id": 1,
    "colli": 1,
    "corriere": 104,
    "servizio": 11,
    "ddt_alpha": "TESTBED659",
    "ddt_num": 659,
    "id": 659,
    "labelType": "ZPL",
    "label_zpl": [
        "^LH0,0^XA^FO0,54^GB827,0,2,B^FS^FT22,799^A ..... 7^FD- page 1 of 1 -^FS^XZ"
    ],
    "merce": "Fashion articles",
    "num_spedizione": "2242605805",
    "peso": 125,
    "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": "1231231234",
    "rcpt_prov": "VA",
    "sender_addr": "Via Belfiore, 24",
    "sender_cap": "46019",
    "sender_city": "Viadana ",
    "sender_contact": "Test mittente",
    "sender_country_code": "IT",
    "sender_email": "ordini@test.com",
    "sender_name": "Test mittente",
    "sender_phone": "3277214680",
    "sender_prov": "MN",
    "tracking_link": "https://mydhl.express.dhl/it/en/tracking.html#/results?id=2242605805",
    "valuta": "EUR"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "errore": "La spedizione consolidata è già stata chiusa, non è possibile eseguire l'operazione richiesta"
}
```

{% endtab %}
{% endtabs %}
