> 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/shipment/casi-duso/eu-customs-reform-2026.md).

# EU customs reform 2026

Product identifiers (PID) and recipient type for shipments imported into the EU

With the 2026 EU customs reform, some couriers require, for low-value shipments from outside the EU to recipients in the EU, the identification codes of each shipped product (Product Identifier, PID).

The codes are set on each line of [dettagli\_ordine](/gsped-api-english-version/spedizioni-e-dintorni/shipment/shipment-objects/dettagli_ordine.md), or in the `rows` of [Orders](/gsped-api-english-version/gestione-ordini/orders.md), in the `dati_doganali.pid` object.

The keys of `pid` match the identifiers defined by the reform:

| Key            | Identifier | Content                                                               |
| -------------- | ---------- | --------------------------------------------------------------------- |
| `merchant`     | M-PID      | Merchant Product Identifier, the seller's item code                   |
| `manufacturer` | NS-PID     | Non-standard Manufacturer Product Identifier, the manufacturer's code |
| `standardized` | S-PID      | Standardized Product Identifier, the EAN/GTIN code                    |
| `broker`       | none       | Customs broker code                                                   |

Gsped sends the codes to the courier in the shipment data and shows them on the proforma invoice, see [Data sent to the couriers](/gsped-api-english-version/spedizioni-e-dintorni/shipment/casi-duso/eu-customs-reform-2026.md#data-sent-to-the-couriers).

```json
{
    "rcpt_type": 1,
    "dettagli_ordine": [
        {
            "sku": "PBK1",
            "description": "Cosa blu",
            "qty": "1",
            "um": "PCS",
            "barcode_riga": "8001234567890",
            "hs_code": "123456454",
            "prezzo_singolo": "12.50",
            "peso_riga": "1",
            "country_of_origin": "CN",
            "dati_doganali": {
                "pid": {
                    "merchant": "PBK1-BLU",
                    "manufacturer": "MF-001",
                    "standardized": "8001234567890",
                    "broker": "BRK-001"
                }
            }
        }
    ]
}
```

Compared to the original [Shipment POST](/gsped-api-english-version/spedizioni-e-dintorni/shipment.md#shipment-post) call, the following fields are added, with their description

<table data-full-width="true"><thead><tr><th width="330">Field</th><th width="104" data-type="checkbox">Required</th><th width="87">Type</th><th>Description</th></tr></thead><tbody><tr><td>rcpt_type</td><td>false</td><td>int</td><td>Recipient type:<br>- 1 : Private<br>- 2 : Business<br>If not set it is 0 (not specified)</td></tr><tr><td>dettagli_ordine.dati_doganali.pid.merchant</td><td>false</td><td>string</td><td>M-PID, merchant code of the product, max 100 char<br>If not set, the line sku is used, or the barcode_riga if the sku is missing</td></tr><tr><td>dettagli_ordine.dati_doganali.pid.manufacturer</td><td>false</td><td>string</td><td>NS-PID, manufacturer code of the product, max 100 char</td></tr><tr><td>dettagli_ordine.dati_doganali.pid.standardized</td><td>false</td><td>string</td><td>S-PID, EAN/GTIN code of the product: GTIN-8, GTIN-12, GTIN-13, GTIN-14 or ISBN-10 with a valid check digit, spaces and dashes are removed<br>If not set, the barcode_riga is used, only if it is a valid GTIN</td></tr><tr><td>dettagli_ordine.dati_doganali.pid.broker</td><td>false</td><td>string</td><td>Broker code, max 64 char</td></tr></tbody></table>

{% hint style="info" %}
`dati_doganali` can be sent as an object or as a JSON string and contains only the `pid` key.\
Keys other than the ones listed or invalid codes are rejected with a 400 error.\
An empty or `null` code is not saved.\
In the [Orders](/gsped-api-english-version/gestione-ordini/orders.md) PATCH, `dati_doganali` sent replaces the saved codes of the detail: codes not sent are deleted, `null` or empty deletes them all. If `dati_doganali` is not sent the codes stay unchanged.
{% endhint %}

## Shipments subject to the checks

The checks are performed for the DHL, Spring and FedEx couriers on shipments with:

* private or not specified recipient (`rcpt_type` 1 or 0)
* sender outside the EU and recipient in the EU
* value up to 150 €, values in another currency are converted into euro with the daily exchange rate

Return shipments are excluded and do not send product codes.

## Errors

With a private recipient (`rcpt_type` 1), if a code set in the request is longer than the courier accepts, the shipment goes into error (status 0.6) and the `error` field reports the line to fix on the order.

```
ERROR - Product code longer than the courier accepts, fix it on the order: riga 2 (sku PBK1): codice venditore di 41 caratteri, limite 35
```

| Courier | Maximum length |
| ------- | -------------- |
| DHL     | 35 char        |
| Spring  | 64 char        |

{% hint style="info" %}
Codes derived from sku or barcode\_riga do not block the shipment: they are truncated by the courier and reported in the warnings.\
The line detail of the message is in Italian.
{% endhint %}

## Warnings

The responses of [Shipment](/gsped-api-english-version/spedizioni-e-dintorni/shipment.md) POST, GET and PATCH, of [Order To Shipment](/gsped-api-english-version/gestione-ordini/order-to-shipment.md) and of [BulkShipment - closeMaster](/gsped-api-english-version/spedizioni-e-dintorni/spedizioni-consolidate/bulkshipment-closemaster.md) contain the `warnings` field, always present, with the warnings that do not block the shipment.

```json
"warnings": [
    {
        "code": "PID_MISSING",
        "row": 0,
        "sku": "PBK1",
        "message": "riga 1 (sku PBK1): manca il codice produttore"
    }
]
```

<table data-full-width="true"><thead><tr><th width="178">Field</th><th width="87">Type</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>string</td><td>Warning code</td></tr><tr><td>row</td><td>int</td><td>Index of the order line starting from 0, null for warnings on the shipment</td></tr><tr><td>sku</td><td>string</td><td>SKU of the line, null for warnings on the shipment</td></tr><tr><td>message</td><td>string</td><td>Description of the warning, in Italian: use <code>code</code> for automated checks</td></tr></tbody></table>

<table data-full-width="true"><thead><tr><th width="250">Code</th><th>Description</th></tr></thead><tbody><tr><td>PID_TOO_LONG</td><td>The code is longer than the courier accepts and will be truncated</td></tr><tr><td>PID_MISSING</td><td>A code required by the courier is missing:<br>- DHL and Spring: merchant code and manufacturer code<br>- Spring: broker code for shipments to the USA</td></tr><tr><td>VALUE_MISSING</td><td>Shipment value missing, checks not performed</td></tr><tr><td>VALUE_NOT_VERIFIABLE</td><td>Value cannot be converted into euro, checks not performed</td></tr><tr><td>COUNTRY_NOT_VERIFIABLE</td><td>Origin or destination country cannot be verified, checks not performed</td></tr></tbody></table>

## Data sent to the couriers

| Courier | Data sent                                                                                                                                |
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| DHL     | Merchant code, manufacturer code and EAN/GTIN code, max 35 char. In consolidated shipments the master receives the lines of the children |
| FedEx   | Merchant code, manufacturer code and EAN/GTIN code, if the EAN/GTIN code is missing NA is sent                                           |
| Spring  | All codes, max 64 char, see [Spring](/gsped-api-english-version/spedizioni-e-dintorni/shipment/corrieri/spring.md)                       |
| Asendia | EAN/GTIN code, see [Asendia](/gsped-api-english-version/spedizioni-e-dintorni/shipment/corrieri/asendia.md)                              |

{% hint style="info" %}
The proforma invoice generated by Gsped shows the merchant, manufacturer and EAN/GTIN codes when they have been set.
{% endhint %}
