# Objednávka celní zásilky

:::info[Rozšířená specifikace]
Jedná se o rozšířenou specifikaci endpointu `https://www.zaslat.cz/api/v1/shipments/create` —
viz [Vytvoření objednávky zásilek](/api-v1/zasilky#vytvoreni-objednavky-zasilek) v API Referenci.
:::

## Specifikace pro celní deklarace

Oproti dokumentaci je pro celní řízení potřeba dále uvést objekt `customs`.

| Parametr | Typ | Popis | Povinný |
| --- | --- | --- | --- |
| `reason` | enum | hodnoty viz [Důvod `reason`](#důvod-reason) | ano |
| `invoice` | enum | hodnoty `create`, `own` | ano |
| `invoice_files` | array[] | pole file tokenů | ne\* |
| `customs_representation_file` | string | file token | ne |
| `currency` | enum | hodnoty `CZK`, `EUR`, `USD` | ano |
| `items` | array[] | pole položek, viz [Objekt `items`](#objekt-items) | ano |
| `additional_info` | array[] | pole `additional_info`, viz [Objekt `additional_info`](#objekt-additional_info) | ne\*\* |

:::note
\* Povinné, pokud negenerujeme fakturu na naší straně (`invoice` = `own`).

\*\* Pokud to nevyžaduje druh přepravovaného zboží.
:::

### Objekt `items`

| Parametr | Typ | Popis | Povinný |
| --- | --- | --- | --- |
| `name` | string | popis | ano |
| `country` | string | kód země ISO 3166-1 alpha-2 | ano |
| `quantity` | string | množství | ano |
| `value` | string | hodnota za jednotku | ano |
| `hs_code` | string | HS Code | |

### Objekt `additional_info`

| Parametr | Typ | Popis | Povinný |
| --- | --- | --- | --- |
| `type` | enum | typ, viz [Další informace `additional_info`](#další-informace-additional_info) | ano |
| `value` | string | hodnota | ano |

---

## Číselník

### Důvod `reason`

| Kód | Popis |
| --- | --- |
| `commercial` | Komerční zboží |
| `documents` | Obálka s dokumenty (nepodléhá celnímu řízení) |
| `gifts` | Dárky osobní nebo nekomerční |
| `samples` | Vzorky |
| `returns` | Vratky |

### Další informace `additional_info`

| Kód | Popis |
| --- | --- |
| `eori` | EORI číslo |
| `vatno` | DIČ identifikátor |
| `pref_statement_gb` | výchozí hodnota:<br />_The exporter of the products covered by this document declares that, except where otherwise clearly indicated, these products are of GB preferential origin._ |
| `pref_statement_eu` | výchozí hodnota:<br />_The exporter of the products covered by this document declares that, except where otherwise clearly indicated, these products are of EU preferential origin._ |
| `other` | ostatní |

## Příklad dotazu

Příklad těla požadavku metodou **POST**:

```json
{
    "payment_type": "ONLINE",
    "currency": "CZK",
    "payer": {
        "id": null,
        "country": "CZ",
        "company": "Zaslat s.r.o.",
        "tin": "",
        "vatin": "",
        "firstname": "Aleš",
        "surname": "Vomáčka",
        "phone": "+420777888999",
        "phone_number": {
            "prefix": "420",
            "number": "777888999"
        },
        "email": "ales@example.com",
        "street": "Sukova 49/4",
        "city": "Brno",
        "zip": "602 00",
        "type": "sender"
    },
    "shipments": [
        {
            "from": {
                "id": null,
                "country": "CZ",
                "company": "Zaslat s.r.o.",
                "tin": "",
                "vatin": "",
                "firstname": "Aleš",
                "surname": "Vomáčka",
                "phone": "+420777888999",
                "phone_number": {
                    "prefix": "420",
                    "number": "777888999"
                },
                "email": "zejda@zaslat.cz",
                "street": "Sukova 49/4",
                "city": "Brno",
                "zip": "602 00"
            },
            "to": {
                "id": null,
                "country": "US",
                "company": "",
                "tin": "",
                "vatin": "",
                "firstname": "Brandon",
                "surname": "Walsch",
                "phone": "+420777888999",
                "phone_number": {
                    "prefix": "420",
                    "number": "777888999"
                },
                "email": "brandon@walsch.com",
                "street": "Lincoln st 1",
                "city": "Beverly Hills",
                "zip": "90210"
            },
            "type": "ONDEMAND",
            "reference": "Export",
            "packages": [
                {
                    "type": 0,
                    "weight": 1,
                    "width": 1,
                    "height": 1,
                    "length": 1
                }
            ],
            "currency": "CZK",
            "pickup_date": "2023-11-30",
            "customs": {
                "reason": "commercial",
                "invoice": "create",
                "invoice_files": [],
                "customs_representation_file": null,
                "currency": "EUR",
                "items": [
                    {
                        "name": "Commercial goods 1",
                        "country": "CZ",
                        "quantity": "1",
                        "value": "10",
                        "hs_code": "0102"
                    },
                    {
                        "name": "Commercial goods 1",
                        "country": "SK",
                        "quantity": "1",
                        "value": "10",
                        "hs_code": "0102"
                    }
                ],
                "additional_info": [
                    {
                        "type": "eori",
                        "value": "1458"
                    },
                    {
                        "type": "vatno",
                        "value": "IC4545"
                    },
                    {
                        "type": "pref_statement_gb",
                        "value": "The exporter of the products covered by this document declares that, except where otherwise clearly indicated, these products are of GB preferential origin."
                    },
                    {
                        "type": "pref_statement_eu",
                        "value": "The exporter of the products covered by this document declares that, except where otherwise clearly indicated, these products are of EU preferential origin."
                    },
                    {
                        "type": "other",
                        "value": "Other custom valeu"
                    }
                ]
            },
            "services": []
        }
    ]
}
```