> 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/corrieri/db-schenker.md).

# Db Schenker

## Gsped code list

<table data-full-width="true"><thead><tr><th>Service</th><th data-type="number">Courier code</th><th data-type="number">Service code</th><th>Notes</th></tr></thead><tbody><tr><td>System</td><td>17</td><td>43</td><td></td></tr><tr><td>System Premium</td><td>17</td><td>44</td><td></td></tr><tr><td>System Home</td><td>17</td><td>45</td><td></td></tr><tr><td>Full Load</td><td>17</td><td>71</td><td></td></tr><tr><td>Part Load</td><td>17</td><td>72</td><td></td></tr></tbody></table>

* [Pickup together with the shipment](https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/casi-duso/ritiro-contestuale) is **REQUIRED**

```json
{
    "date_req_ritiro":"2023-11-01",
    "opening_time":"08:00:00",
    "closing_time":"12:00:00"
}
```

* The volume can NOT be 0 and must be sent with at most 2 decimal places
* The **weight** (peso) can have at most 2 decimal places
* The courier treats each parcel as at least 1 Kg even if lighter
* The [incoterm](https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/shipment-objects/incoterm) section (location max 35 characters) is **REQUIRED**.

```json
"incoterm": {
    "incoterm_code": "EXW",
    "location": "C.So f. cavallotti 15 Alessandria"
}
```

## Customs clearance

To request customs clearance from DB Schenker, use the [courierSpecificData](https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/shipment-objects/courierspecificdata.md) object with the `dbschenker` key. It is optional: if it is not sent, the shipment is created without a customs clearance request.

```json
"dbschenker": {
    "customs_clearance": true,
    "customs_clearance_eu": true,
    "export_customs_declarant": "dbschenker",
    "import_customs_declarant": "dbschenker"
}
```

<table data-full-width="true"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>customs_clearance</td><td>boolean</td><td>Customs clearance request. Defaults to <code>false</code></td></tr><tr><td>customs_clearance_eu</td><td>boolean</td><td>Customs clearance for European land transport</td></tr><tr><td>export_customs_declarant</td><td>string</td><td>Export customs declarant. Allowed values: <code>dbschenker</code>, <code>notrequired</code></td></tr><tr><td>import_customs_declarant</td><td>string</td><td>Import customs declarant. Allowed values: <code>dbschenker</code>, <code>notrequired</code>, <code>notspecified</code></td></tr></tbody></table>

* The declarants are optional: if they are not sent and `customs_clearance_eu` is `true`, the declarant is DB Schenker.
* Boolean fields must be sent as `true`/`false`, not as strings.
* A value that is not allowed, or a field other than those listed, is rejected with a **400** error.

## Customs documents (PLT)

DB Schenker supports [PLT (paperless)](https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/corrieri/corrieri-abilitati-al-plt-paperless.md): the documents are sent in the [trade\_documents](https://apidocs.gsped.com/gsped-api-english-version/spedizioni-e-dintorni/shipment/shipment-objects/trade_documents.md) field of the shipment creation, following the file naming convention.

```json
"trade_documents": [
    {
        "nome": "COMMERCIAL_INVOICE_TESTRIF1234_1.pdf",
        "contenuto": "<base64 pdf>"
    },
    {
        "nome": "PACKING_LIST_TESTRIF1234_1.pdf",
        "contenuto": "<base64 pdf>"
    }
]
```

Accepted document types:

| Document type           | Type sent to DB Schenker |
| ----------------------- | ------------------------ |
| COMMERCIAL\_INVOICE     | Commercial Invoice       |
| PRO\_FORMA\_INVOICE     | Commercial Invoice       |
| CERTIFICATE\_OF\_ORIGIN | Certificate of Origin    |
| PACKING\_LIST           | Packing List             |
| EXPORT\_LICENSE         | Licenses and Permits     |
| IMPORT\_PERMIT          | Licenses and Permits     |
| OTHER                   | Others                   |

{% hint style="warning" %}
A file whose name does not start with one of the types in the table (for example `invoice.pdf`) is sent to DB Schenker as **Others**. To be recognised as an invoice, it must be named for example `COMMERCIAL_INVOICE_TESTRIF1234_1.pdf`.
{% endhint %}

* **PDF only.** Files in other formats are not sent to DB Schenker: the shipment is still created (status 0) and the `error` field contains the warning *"Documenti non trasmessi a DB Schenker perché in un formato non ammesso: …"* (documents not sent to DB Schenker because of a format that is not allowed).
* **4 MB in total at most** per shipment, as the sum of the files. Above this limit the shipment fails (status 0.6) with the message *"Documenti doganali troppo grandi per DB Schenker: X MB in totale, il massimo è 4.0 MB"* (customs documents too large for DB Schenker).
* The documents must be sent when the shipment is **created**: DB Schenker does not allow documents to be sent at a later time.
