API documentation Declarations
Contents
Get declaration information
Provides all available information about a parcel's most recent declaration, such as the VAT and duty estimates, timestamps of major events such as customs controls and clearing.
Endpoint
[GET] /v4/parcels/{client_ref}/declaration
Attributes
Key | Description | Datatype | Constraints |
act_payable_duties | Duties, officially determined by Customs | Integer |
In cents, e.g.
250
stands for 2.50€.
Note this key appears under the top level, as well as under the
product
keys. On the top level, the sum of all duties on this declaration is displayed. On the
product level, only individual duties for one product are displayed.
|
act_payable_vat | VAT, officially determined by Customs | Integer |
In cents, e.g.
10
stands for 0.10€
Note this key appears under the top level, as well as under the
product
keys. On the top level, the sum of all duties on this declaration is displayed. On the
product level, only individual duties for one product are displayed.
|
customs_value | Customs value, determined by ViaEurope | Integer |
In cents, e.g.
10
stands for 0.10€
Note this key appears under the top level, as well as under the
product
keys. On the top level, the sum of all customs values on this declaration is displayed. On the
product level, only the individual customs value for one product are displayed.
|
intrinsic_value | Intrinsic value, calculated by ViaEurope | Integer |
In cents, e.g.
250
stands for 2.50€.
Note this key appears under the top level, as well as under the
product
keys. On the top level, the sum of all intrinsic values on this declaration is displayed. On the
product level, only individual intrinsic values for one product are displayed.
|
est_payable_duties | Duties, estimated by ViaEurope | Integer |
In cents, e.g.
250
stands for 2.50€
Note this key appears under the top level, as well as under the
product
keys. On the top level, the sum of all duties on this declaration is displayed. On the
product level, only individual duties for one product are displayed.
|
est_payable_vat | VAT, estimated by ViaEurope | Integer |
In cents, e.g.
10
stands for 0.10€
Note this key appears under the top level, as well as under the
product
keys. On the top level, the sum of all duties on this declaration is displayed. On the
product level, only individual duties for one product are displayed.
|
est_sales_vat | Sales VAT, estimated by ViaEurope | Integer |
In cents, e.g.
10
stands for 0.10€
Note this key appears under the top level, as well as under the
product
keys. On the top level, the sum of all duties on this declaration is displayed. On the
product level, only individual duties for one product are displayed.
|
sales_vat_percentage | Sales VAT percentage in the country of declaration | Float |
0.19
stands for 19%
Note this key appears under the top level, as well as under the
product
keys.
|
cleared_at | Timestamp when customs "cleared" response was received | Timestamp | |
put_in_control_at | Timestamp when customs "control" response was received | Timestamp | |
state | State of declaration | String |
Can be
|
long_haul_type | Parcel's mode of transport | String |
When present, can be
|
base_value | Product's base value, for all pieces, as entered by the client | String | |
declarable_long_haul_cost | Exact IOSS declarable long haul cost (i.e. mainly outside EU share) for all pieces of this product. Contact support to confirm eligibility to provide this value. | String | Must be absent unless eligibility confirmed by support. |
force_general_clearance | Submit customs declaration using general clearance method independent from goods value. | Boolean | |
description | Product's description, as entered by the client | String | |
quantity | Product's quantity, for all pieces, as entered by the client | String | |
weight | Product's weight, for all pieces, as entered by the client | String |
Example
Response
{ "act_payable_duties": 1330, "act_payable_vat": 0, "customs_value": 12345, "cleared_at": "2018-09-26T11:33:28.300+02:00", "est_payable_duties": 1330, "intrinsic_value": 109000, "force_general_clearance": false, "long_haul_type": null, "est_payable_vat": 0, "est_sales_vat": 0, "sales_vat_percentage": 0, "put_in_control_at": null, "state": "cleared", "products": [ { "act_payable_duties": 958, "act_payable_vat": 0, "base_value": 88726, "client_ref": "abc-789", "customs_value": 66341, "intrinsic_value": 77000, "description": "KETTLE BAG", "est_payable_duties": 958, "est_sales_vat": 0, "sales_vat_percentage": 0, "est_payable_vat": 0, "marketplace_url": "http://www.amazon.de/123", "original_taric": "1234567890", "quantity": 74, "taric": "1234567890", "weight": 11100 }, { "act_payable_duties": 372, "act_payable_vat": 0, "base_value": 34450, "intrinsic_value": 32000, "client_ref": "abc-789", "customs_value": 20334, "description": "BACKPACK", "est_payable_duties": 372, "est_payable_vat": 0, "est_sales_vat": 0, "sales_vat_percentage": 0, "marketplace_url": "http://www.amazon.de/123", "original_taric": "1234567890", "quantity": 5, "taric": "1234567890", "weight": 3000 } ], "released_at": null }
Create new declaration
Creates a new declaration in the ViaEurope system. This endpoint has no response, other than a HTTP status code to indicate success or failure, along with possible errors. Note that any previous, pending declarations must be canceled prior to assigning a new declaration to a parcel
Endpoint
[POST] /v4/parcels/{client-ref}/declaration
Attributes
Key | Description | Datatype | Constraints | Errors |
type | Type of declaration | String |
The following types are available, dependent on
declaration_country
value:
|
|
declaration_country | Country in which products will be declared to Customs | String |
Must be a 2-letter ISO 3166-2 code. Currently available:
NL
(Netherlands),
BE
(Belgium, regular parcels only) and
HU
(Hungary). See
type
for more information.
|
|
country_of_export | Country from which the products were exported | String |
Must be a 2-letter ISO 3166-2 code, e.g.
CN
|
|
origin_client_ref | Internal reference for original client | String | Optional. 5-30 characters, must only contain characters A-Z, 0-9, minus and underscore |
|
ioss_number | Registered VIAIOSS reference (see here or I-OSS number of shipper | String |
Optional.
Mandatory for B2C declarations in DE, BE, HU.
Mandatory if import VAT exemption must be claimed at import. The I-OSS number can only be from the Seller or if sold through a platform the I-OSS number of the platform.
Must be either:
|
|
vat_number | VAT number of shipper/consignee | String | Optional. Mandatory when the VAT is deferred at import. The VAT number of the shipper (in case type is Marketplace), the seller (in case of Sale B2C) or of the consignee (in case type is Sale B2B). |
|
poa_number | POA number | String | Optional. Mandatory when the VAT is deferred at import. You receive a POA number from ViaEurope if you use our VAT deferment service. |
|
representative_eori_number | Representative EORI number | String | Optional. Mandatory for B2B and B2B2C. Indicates demand for direct Customs representation. Only for registered clients. Contact support to register. |
|
representative_poa_number | Representative POA number | String | Optional. Mandatory for B2B and B2B2C. Indicates demand for direct Customs representation. Only for registered clients. Contact support to register. |
|
consignee | Consignee of parcel | JSON | Optional. Mandatory if no delivery was booked for the parcel, or when doing a dry run |
|
consignee > shortcode | Name | String | Optional. An alternative to passing full address parameters. When submitting address data, it's possible to send only shortcode and name1, and the rest of the attributes (name2, street, city, zip, country) will be selected and assigned by matching the shortcode. |
|
consignee > name1 | Name | String | Maximum 35 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. |
|
consignee > name2 | Name (continued) | String | Optional. Maximum 35 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. |
|
consignee > street | Street | String | Maximum 70 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. Must not contain zip code. Must not contain city. |
|
consignee > city | City | String | 2-35 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. |
|
consignee > country | Country | String | 2 character ISO 3166-Alpha 2 country code. See Countries list for more information. |
|
consignee > zip | Zip | String | Zipcode associated with the address |
|
consignee > email | Email of recipient | String | Optional. Maximum 50 characters |
|
consignee > phone | Phone number | String | Optional. Maximum 15 characters. Must only contain characters 0-9, plus and minus. |
|
exporter | Exporter of parcel | JSON | Optional. | |
exporter > name1 | Name | String | Maximum 35 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. |
|
exporter > name2 | Name (continued) | String | Optional. Maximum 35 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. |
|
exporter > street | Street | String | Maximum 70 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. Must not contain zip code. Must not contain city. |
|
exporter > city | City | String | 2-35 characters. Must only contain latin or printable ASCII characters. Must not contain line breaks. |
|
exporter > country | Country | String | 2 character ISO 3166-Alpha 2 country code. |
|
exporter > zip | Zip | String | Zipcode associated with the address |
|
exporter > email | Email of recipient | String | Optional. Maximum 50 characters |
|
exporter > phone | Phone number | String | Optional. Maximum 15 characters. Must only contain characters 0-9, plus and minus. |
|
force_general_clearance | Submit customs declaration using general clearance method independent from goods value. | Boolean | Optional |
|
products | Goods contained in parcel | Array of JSON | Please use one entry per kind of goods (same description and taric code). |
|
description | Description of product | Array of JSON | 3-70 characters, must only contain characters A-Z, 0-9, minus and underscore |
|
taric | European HS code | String | Taric code (10 digits) or HS-code (6 digits, allowed for Sale B2C 4 only). Invalid HS Codes are not accepted. You can use the ViaEurope taric lookup to find the right Taric Code. |
|
base_value | Declared value for total quantity of this product | Integer |
Must be in cents. Value depends on used declaration type.
Example: 15 pieces in the parcel, each piece costs 2.30€. base_value
should be
15 pieces * 2.30€ per piece * 100 cents per € =
3450 cents
|
|
quantity | Quantity of product in parcel | Integer |
|
|
weight | Declared weight for total quantity of this product | Integer |
Must be in grams. Example: 6 pieces in the parcel, each piece weighs 1.5kg.
weight
should be
6 pieces * 1.5kg per piece * 1000 grams per kg =
9000 grams
|
|
country_of_origin | Country in which product was manufactured | String |
Must be a 2-letter ISO 3166-2 code, e.g.
CN
|
|
commercial_ref | Commercial reference of a product that allows to identify it, could be SKU, SKC, MPN, UPC, ISBN, ASIN etc. | String | Mandatory for Sale B2C DE. |
|
marketplace_url | URL linking to product page | String |
Mandatory for all types except Sale B2C and Sale C2C.
Needs to start with
http://
or
https://
|
|
client_ref | Reference of your choice | String | Optional. | |
material | Main material that product is made from | String | Optional. This field helps us to review the provided HS code. |
|
atr_number | ATR Number | String | Optional. This field is applicable only when country of origin is Turkey. |
|
long_haul_type | Mode of transport of parcel | String | Optional. This field is mandatory for BE Marketplace 5, must be absent for the other types of declaration. |
|
fulfiller | Online marketplace operator or fulfillment company | String |
Optional.
Slug value of the fulfiller (e.g.
amazon
). This field is mandatory for BE Marketplace 5, must be absent for the other types of declaration.
|
|
Generic errors
In addition to specific errors at the attribute level, the following errors may occur at the base level of the declaration, because they are not tied to one specific attribute, depend on multiple attributes or depend on additional registrations.
Example
Request
{ "type": "sale_b2c_4", "declaration_country": "NL", "country_of_export": "CN", "force_general_clearance": null, "origin_client_ref": "FOOBAR", "consignee": { "name1": "ViaEurope BV", "street": "Pudongweg 21", "zip": "1437EM", "country": "NL", "city": "Rozenburg" }, "exporter": { "name1": "Exporter name", "street": "Exporter street", "zip": "510620", "city": "Guangzhou", "country": "CN" }, "products": [ { "description": "Carpenter Hammer", "taric": "1234567890", "base_value": 36120, "quantity": 10, "weight": 6000, "country_of_origin": "CN", "client_ref": "ABC-123", "marketplace_url": "http://www.amazon.de/dp/B000VCZU8O" }, { "description": "Beard Trimmer", "taric": "1234567890", "base_value": 17990, "quantity": 10, "weight": 10000, "country_of_origin": "CN", "client_ref": "DEF-789", "marketplace_url": "https://www.amazon.co.uk/dp/B07BHXZLZR" } ] }
Cancel declaration
Will cancel the parcel's most recent declaration. This cannot be undone! This endpoint has no response, other than a HTTP status code to indicate success or failure, along with possible errors.
Endpoint
[DELETE] /v4/parcels/{client_ref}/declaration