When making shipments from the EU to a country outside the EU, or the other way around, it is mandatory to include customs details to some carriers. Some carriers support paperless invoicing services (also called electronic invoicing). This article will explain how to include this information in your request to nShift's Shipment Server API.
Example request to Shipment Server API
Please be aware that carriers have different requirements for the custom details so even though many of the fields are similar, they will vary from carrier to carrier.
The request example below shows a shipment with carrier UPS using the product "UPS Saver" and the service "Commercial invoice (Paperless)". The sender is located in Denmark and the receiver is in the United States.
GroupID 1 refers to the group of fields known as Article Info and contains customs information related to the individual items. Here it is possible to add information on detail line level.
GroupID 2 refers to the group of fields known as Customs Info and contains general customs information related to the shipment.
See our appendix to get a list of all possible GroupIDs.
The Kind IDs in each group refer to the individual customs fields, e.g. kindID 7 in group 1 refers to the description of the goods. See the table with all possible Detail Kind IDs at the bottom of the article. The table also gives you an overview of supported detail fields on the most used carriers supporting customs details. Not all the fields are mandatory on each carrier. You may use the method ValidateShipment to see if you have filled in the minimum required fields in your request.
{ "Kind": 1, "OrderNo": "12345", "ActorCSID": 1378, "ProdConceptID": 677, "Addresses": [ { "Kind": 2, "Name1": "nshift", "Street1": "Bredskifte Alle 11", "PostCode": "8210", "City": "AARHUS V", "Phone": "70273377", "Attention": "Jane Doe", "CountryCode": "DK" }, { "Kind": 1, "Name1": "Beverly Hills Hotel", "Street1": "9641 Sunset Blvd", "PostCode": "90210", "City": "Beverly Hills", "State": "CA", "Phone": "+13102762251", "Attention": "John Doe", "CountryCode": "US" } ], "Amounts": [ { "Kind": 10, "CurrencyCode": "6", "Value": 18 } ], "References": [ { "Kind": 140, "Value": "test@test.com" }, { "Kind": 108, "Value": "2018-09-24T13:14:13+0200" }, { "Kind": 27, "Value": "John Doe" }, { "Kind": 109, "Value": "2018-09-24T16:14:00" } ], "Lines": [ { "GoodsTypeID": 1, "GoodsTypeName": "UPS Letter", "GoodsTypeKey1": "01", "GoodsTypeKey2": "02", "Number": 1, "RecycleTypeID": -1, "References": [ { "Kind": 23, "Value": "Postcards" } ], "PkgWeight": 2000, "LineWeight": 2000 } ], "Services": [ 60023 ], "DetailGroups": [ { "GroupID": 1, //Article Info "Rows": [ { "Details": [ { "KindID": 193, //goods line number "Value": 1 }, { "KindID": 5, //No units "Value": "1" }, { "KindID": 8, //Unit of Measure (code) "Value": "KG" }, { "KindID": 7, //Description of goods "Value": "Commercial postcards" }, { "KindID": 4, //Country of Origin "Value": "DK" }, { "KindID": 2, //Unit Value "Value": "125" }, { "KindID": 1, //Article No "Value": "121212" }, { "KindID": 18, //Commodity code "Value": "48817300000" } ] } ] }, { "GroupID": 2, //Customs info "Details": [ { "KindID": 19, //Invoice number "Value": "12345678" }, { "KindID": 24, //Invoice date "Value": "20180924" }, { "KindID": 21, //Currency "Value": "DKK" }, { "KindID": 20, //Reason for Export "Value": "Other" } ] } ] }
Multiple customs detail lines
If you have multiple detail lines on your shipment, you can include RowNo and LineNo in your request. RowNo specifies the detail line number related to a specific goods line and LineNo specifies the goods line number.
The example below shows the structure of the DetailsGroups with 3 detail lines. The first two detail lines (Rows) are related to the first goods line and the third detail line is related to the second goods line:
"DetailGroups": [ { "GroupID": 1, "GroupDisplayName": "Article Info", "Rows": [ { "RowNo": 1, //detail line no 1 related to goodsline no 1 "LineNo": 1, //goods line number 1 "Details": [ //all detail fields here... ] }, { "RowNo": 2, //detail line no 2 also related to goodsline no 1 "LineNo": 1, //goods line number 1 "Details": [ //all detail fields here... ] }, { "RowNo": 1, //detail line no 2 related to goodsline no 2 "LineNo": 2, //goods line number 2 "Details": [ //all detail fields here... ] } ] }, { "GroupID": 2, "GroupDisplayName": "Customs Info", "Details": [ //all detail fields here ] } ],
Overview of details fields
The table below shows all the Details fields. The name of the fields may vary from carrier to carrier but the name in the API will always be the same. The fields with blue text are the most commonly used fields. The carrier columns show which fields are supported on the individual carriers.
Kind ID | Group ID | Name of field / description | Name of field i API | DHL Express | FedEx | Deutsche Post (DHL Parcel) | UPS |
1 | 1 | Article No | eDekArticleNo.CustomsArticle | x | x | ||
2 | 1 | Unit value | eDekUnitValue.CustomsArticle | x | x | x | x |
3 | 1 | Tariff code | eDekTariffCode.CustomsArticle | ||||
4 | 1 | Country of Origin | eDekCountryOfOrigin.CustomsArticle | x | x | x | x |
5 | 1 | No units | eDekQuantity.CustomsArticle | x | x | x | x |
6 | 1 | GrossWeight (KG/LB) / Unit Weight | eDekUnitWeight.CustomsArticle | x | x | ||
7 | 1 | Description /Description of goods | eDekDescrOfGoods.CustomsArticle | x | x | x | x |
8 | 1 | Units of Measure (code) | eDekUnitOfMeasure.CustomsArticle | x | x | x | |
9 | 1 | Gross Weight | eDekTotalWeight.CustomsArticle | x | x | ||
10 | 1 | Amount | eDekTotalValue.CustomsArticle | x | |||
11 | 2 | VAT No Sender | eDekVATSender.CustomsInfo | x | x | ||
12 | 2 | VAT No Receiver | eDekVATReceiver.CustomsInfo | x | x | ||
13 | 2 | VAT No Buyer | eDekVATBuyer.CustomsInfo | x | x | ||
14 | 2 | Additional Comments | eDekOtherComments.CustomsInfo | x | x | x | |
16 | 1 | Customs Value | eDekCustomsValue.CustomsArticle | x | |||
17 | 1 | Unit Value Currency | eDekCurrency.CustomsArticle | x | x | ||
18 | 1 | Commodity Code | eDekCommodityCode.CustomsArticle | x | x | x | x |
19 | 2 | Invoice Number | eDekInvoiceNumber.CustomsInfo | x | x | x | |
20 | 2 | Reason for Export | eDekReasonForExport.CustomsInfo | x | x | x | |
21 | 2 | Currency | eDekCurrency.CustomsInfo | x | x | x | |
22 | 2 | Declaration Statement | eDekDeclarationStatement.CustomsInfo | x | x | x | |
23 | 2 | Commodity Code | eDekCommodityCode.CustomsInfo | x | |||
24 | 2 | Invoice Date | eDekInvoiceDate.CustomsInfo | x | x | x | |
25 | 2 | Terms of Sale (Incoterm) /Terms of trade | eDekTermsofShipment.CustomsInfo | x | x | x | |
26 | 2 | Discount | eDekDiscount.CustomsInfo | x | x | ||
27 | 2 | Freight Charges / Additional fee | eDekFreightCharges.CustomsInfo | x | x | x | x |
28 | 2 | Insurance | eDekInsuranceCharges.CustomsInfo | x | x | x | |
29 | 2 |
Charges Value/ Shipment Amount |
eDekChargesValue.CustomsInfo | x | x | x | |
30 | 2 | Charges Description / Shipment Description | eDekChargesDesc.CustomsInfo | x | x | x | |
31 | 2 | Booking Confirmation Number /Permit Number | eDekBookingNumber.CustomsInfo | x | x | ||
32 | 1 | Number of Pieces | eDekNumberOfPieces.CustomsArticle | x | |||
33 | 2 | Contents | eDekContents.CustomsInfo | ||||
34 | 2 | Gross Weight | eDekGrossWeight.CustomsInfo | ||||
35 | 2 | TDoc No | eDekTDocNo.CustomsInfo | x | |||
36 | 1 | NetWeight (KG/LB) | eDekNettoWeight.CustomsArticle | x | x | x | |
174 | 4 | Customs Amount | eDekCustomsAmount.FedExCustomsInformation | x | |||
175 | 4 | Customs Currency | eDekCustomsCurrency.FedExCustomsInformation | x | |||
176 | 2 | VAT Broker | eDekVATBroker.CustomsInfo | ||||
177 | 2 | Description of Goods | eDekDescriptionOfGoods.CustomsInfo | ||||
178 | 2 | Special instructions | eDekSpecialInstructions.CustomsInfo | x | |||
179 | 2 | Customs Creditor No | eDekCustomsCreditorNo.CustomsInfo | ||||
180 | 1 | Number of Items | eDekNumberOfItems.CustomsArticle | ||||
181 | 2 | Total Value | eDekTotalValue.CustomsInfo | ||||
182 | 2 | Shippers EORI | eDekShippersEORI.CustomsInfo | ||||
183 | 2 | FDA Registration | eDekFDARegistration.CustomsInfo | ||||
184 | 1 | Products Description | eDekProductDescription.CustomsArticle | ||||
185 | 1 | Product Composition | eDekProductComposition.CustomsArticle | x | |||
186 |
1 |
Product Code |
eDekProductCode.CustomsArticle | ||||
187 | 1 | Product Size | eDekProductSize.CustomsArticle | ||||
188 | 1 | Preference | eDekPreference.CustomsArticle | ||||
189 | 1 | Procedure Code | eDekProcedureCode.CustomsArticle | ||||
190 | 1 | Supplementary Unit | eDekSupplementaryUnit.CustomsArticle | ||||
191 | 1 | Certificates Code | eDekCertificatesCode.CustomsArticle | ||||
192 | 1 | Certificates | eDekCertificates.CustomsArticle | ||||
193 | 1 | Goods Line No | eDekGoodsLineNo.CustomsArticle | ||||
501 | 5 | Filling Type | eDekFilingType.DrgkDHLFiling | ||||
502 | 5 | FTSR | eDekFTSR.DrgkDHLFiling | ||||
503 | 5 | INT | eDekINT.DrgkDHLFiling | ||||
504 | 5 | AES4EIN | eDekAES4EIN.DrgkDHLFiling | ||||
505 | 1 | UnitVolume | eDekUnitVolume.CustomsArticle | ||||
506 | 1 | Gender | eDekGender.CustomsArticle | x | |||
507 | 1 | Construction | eDekConstruction.CustomsArticle | ||||
508 | 1 | Fabric Marked | eDekFabricMarked.CustomsArticle | ||||
509 | 1 | Fabric Mutilated | eDekFabricMutilated.CustomsArticle | x | |||
510 | 1 | Manufacturer | eDekManufacturer.CustomsArticle | x | |||
511 | 1 | Production Address | eDekProductionAddress.CustomsArticle | x | |||
512 | 1 | Production Postal Code | eDekProductionPostalCode.CustomsArticle | x | |||
513 | 1 | Production City | eDekProductionCity.CustomsArticle | x | |||
514 | 6 | Order Total Value | eDekOrderTotalValue.OrderData | ||||
515 | 6 | Order VAT | eDekOrderVAT.OrderData | ||||
516 | 1 | Purchase URL | eDekPurchaseURL | ||||
517 | 1 | Weight UOM | eDekWeightUOM | x | |||
518 | 2 | Export License | eDekExportLicense | ||||
519 | 2 | Origin Certificate Number | eDekOriginCertificateNumber | ||||
520 | 2 | Customs Bulk ID | eDekCustomsBulkID | ||||
521 | 2 | Invoice Signature | eDekInvoiceSignature | ||||
522 | 2 | Invoice Signature Date | eDekInvoiceSignatureDate |