Customs Info for Shipments

Provide customs details about your package in your API calls.

About customs and shipments

In international shipping, customs commonly refers to any applicable duties, fees, or taxes charged on items being shipped from one country to another. When shipping internationally, your organization may be required to provide additional customs details about your package.

This document includes example API calls for customs-specific shipping scenarios, including when international document printing is required, when electronic export information (EEI) is not required, when EEI is required, and when you want to pass all customs details for a shipment.

Finally, common definitions associated with customs and international shipping are included.

Carrier-specific requirements

Customs information needed may differ by carrier. Shipium recommends checking specific carrier requirements when shipping internationally. You can find guidance for Shipium-supported carriers with additional customs requirements in the following carrier-specific documentation: Amazon - Ship With Amazon, AMPM, Estafeta, LaserShip, and Paquetexpress.

In addition, UPS recommends including an email address for both the shipper and recipient for international shipments. You can include this information in the shipmentParameters or multiParcelShipmentParameters of your API call as the shipFromAddress.emailAddress and destinationAddress.emailAddress.

Customs items to order item quantity mapping

For certain carriers, accurate customs declaration requires a precise mapping between the individual items declared in your customs information and the corresponding items within each parcel. Shipium facilitates this by connecting the productId values provided in your customsInfo.customsItems with the productId values in your package's orderItemQuantities.

How it works. When you provide customs information for a shipment with the following carriers, Shipium expects that each customsItem will have a productId that matches a productId in one of the orderItemQuantities. This connects each item declared for customs with its corresponding item in your parcel.

Important. If the productId values do not match between your customsInfo.customsItems and your orderItemQuantities, the system will be unable to send complete and accurate customs and item information to the carrier. This may result in:

  • Shipment delays
  • Customs clearance issues
  • Incorrect duties and taxes calculations
  • Shipment rejection by the carrier

Carriers requiring this mapping. The following carriers require this explicit productId mapping for customs declarations:

  • Amazon - Ship With Amazon
  • Cirro
  • ECMS
  • FlavorCloud
  • Reliable Logistics

Action required. When preparing shipments for these carriers, you'll want to ensure that:

  • Every item you declare in customsInfo.customsItems has a unique and accurate productId.
  • Every item listed in your package's orderItemQuantities also has a productId.
  • The productId for each item in customsInfo.customsItems precisely matches the productId of its corresponding item in orderItemQuantities.

Example API calls and responses for international shipping customs

Minimum fields required for international, no EEI required for shipment

This is a sample cURL call to the API including the minimum required information for international shipping when an EEI is not required.

{
    ...
    "labelParameters": {...},
    "shipmentParameters": {
     ...,
     "shipOption": "InternationalTwoToFiveDay",
      "customsInfo": {
          "totalCustomsValue": 54.95,
          "totalCustomsValueCurrency": "usd",
          "customsDescription": "9 mm steel screws",
          "reasonForExport": "sale",
          "invoiceDate": "2022-06-13",
          "customsItems": [
              {
                  "customsValue": 18.31,
                  "customsValueCurrency": "usd",
                  "commodityDescription": "9 mm steel screws",
                  "countryOfManufacture": "US",
                  "customsWeight": {
                      "weight": 4,
                      "weightUnit": "lb"
                  },
                  "quantity": 3,
                  "quantityUnitOfMeasurement": "box",
                  "harmonizedTariffNumber": "9876543210"
              }
          ]
      }
  }
}

Minimum fields for a shipment that requires an EEI, and EEI is filed through AES Direct

This is a sample cURL call to the API including the minimum required information for international shipping when an EEI is required and it is filed through the Automated Commercial Environment (ACE) AESDirect.

{
    ...
    "labelParameters": {...},
    "shipmentParameters": {
     ...,
     "shipOption": "InternationalTwoToFiveDay",
      "customsInfo": {
          "totalCustomsValue": 54.95,
          "totalCustomsValueCurrency": "usd",
          "customsDescription": "9 mm steel screws",
          "reasonForExport": "sale",
          "invoiceDate": "2022-06-13",
          "aesInternalTransactionNumber": "X20220613366903",
          "customsItems": [
              {
                  "customsValue": 18.31,
                  "customsValueCurrency": "usd",
                  "commodityDescription": "9 mm steel screws",
                  "countryOfManufacture": "US",
                  "customsWeight": {
                      "weight": 4,
                      "weightUnit": "lb"
                  },
                  "quantity": 3,
                  "quantityUnitOfMeasurement": "box",
                  "harmonizedTariffNumber": "9876543210"
              }
          ]
      }
  }
}

Sample API call with customs information included

This is a sample cURL call to the API including customs information. Importer of record and broker are not included in this sample call; the Broker & Importer of Record document provides details about these optional fields that can be included in your API call. The Tax Identification Number document includes information about the optional tax ID field in the sample call.

{
    ...
    "labelParameters": {...},
    "shipmentParameters": {
     ...,
     "shipOption": "InternationalTwoToFiveDay",
     "customsInfo": {
          "totalCustomsValue": 54.95,
          "totalCustomsValueCurrency": "usd",
          "customsDescription": "9 mm steel screws",
          "reasonForExport": "sale",
          "invoiceDate": "2022-06-13",
          "invoiceNumber": "123-abc-456",
          "europeanUnionInfo": {
              "vendorIossNumber": "123456789012"
          },
          "ultimateConsigneeAddress": {
              "name": "Wile E. Coyote",
              "phoneNumber": "1112223333",
              "emailAddress": "[email protected]",
              "street1": "123 Test",
              "city": "St. John's",
              "state": "NL",
              "countryCode": "CA",
              "postalCode": "A1A 2H4",
              "addressType": "residential"
          },
          "ultimateConsigneeType": "direct_consumer",
          "aesInternalTransactionNumber": "X20220613366903",
          "electronicExportInformation": { // Note: not needed if an aesInternalTransactionNumber is provided
              "exportDate": "2022-06-15",
              "pointOfOrigin": "CO"
          },
         "b13AFilingOption": "NOT_REQUIRED",
          "exportComplianceStatement": "AESX20220714987654",
          "permitNumber": "12345",
          "incoterm": "ddp",
          "declarationStatement": "I declare that the information provided is true and accurate. These commodities are licensed by the United States for export to the destination country",            
          "taxIdentificationNumber": "12345",
          "customsItems": [
              {
                  "customsValue": 18.31,
                  "customsValueCurrency": "usd",
                  "commodityDescription": "9 mm steel screws",
                  "countryOfManufacture": "US",
                  "customsWeight": {
                      "weight": 4,
                      "weightUnit": "lb"
                  },
                  "quantity": 3,
                  "quantityUnitOfMeasurement": "box",
                  "harmonizedTariffNumber": "9876543210",
                  "productId": "ABC123",
                  "commodityPartNumber": "12345",
                  "marksAndNumbers": "1 of 1",
                  "electronicExportCommodityInformation": { // Note: not needed if the carrier is not filing an EEI
                      "exportType": "domestic",
                      "exportInformationCode": "LC",
                      "scheduleBInformation": {
                          "scheduleBNumber": "6404195500",
                          "scheduleBQuantity": 3,
                          "scheduleBUnitOfMeasurement": "pack"
                      },
                      "eccnNumber": "EAR99",
                      "exportLicenseInformation": {
                          "licenseType": "C33",
                          "licenseExemptionCode": "NLR",
                          "exportLicense": {  // Note: not needed if you have provided a licenseExemptionCode
                              "licenseNumber": "123ABC",
                              "licenseLineValue": 1000,
                              "licenseExpiration": "2025-06-13"
                          }
                      }
                  }
              }
          ]
      }
  }
}

Sample response with customs information included in the API call

This is a sample JSON response from the API when customs information was included in the API call.

{
  "carrierSelection": {
    ....
  },
  ....,
  ....,
  "carrierLabel": {
    ....,
    ....,
    "documents": [
      {
        "labelExpiration": "2023-11-19T21:08:54.305Z",
        "labelFormat": "zpl",
        "labelImage": {
          "imageContents": "BASE64LOOKINGSTUFFANDWHATHAVEYOUETCETCETC",
          "imageEncoding": "base64"
        },
        "labelUrl": "https://api.shipium.com/labels/1a486afc-2ffc-4c37-928f-8d6aa014b35b.zpl"
      }
    ],
    "internationalDocuments": [
      {
        "documentType": "commercial_invoice", // "commercial_invoice", "electronic_export_information", "ps_2976", "air_waybill" or "multiple"
        "documentExpiration": "2023-11-19T21:08:54.305Z",
        "documentFormat": "pdf",
        "documentImage": {
          "documentEncoding": "base64",
          "documentContents": "BASE64LOOKINGSTUFFANDWHATHAVEYOUETCETCETC"
        },
        "electronicallySubmitted": false
      }
    ]
    ....,
    ....,
  },
  ....,
  ....
}

Minimum fields required for U.S. territory, APO, FPO, DPO

Shipium’s guidance is that as much of the following information be provided as possible for a shipment to a U.S. territory or a military region to ensure that the shipment is not returned. While some fields are marked as not required for one carrier and required for another carrier, it is not known which carrier will be chosen during carrier selection. Therefore, it is best to supply enough information for all carriers.

{
    ...
    "labelParameters": {...},
    "shipmentParameters": {
     ...,
      "customsInfo": {
          "totalCustomsValue": 54.95,
          "totalCustomsValueCurrency": "usd",
          "reasonForExport": "sale",                   // not strictly required for USPS
          "invoiceDate": "2022-06-13",                 // required for UPS
          "customsItems": [
              {
                  "customsValue": 18.31,
                  "customsValueCurrency": "usd",
                  "commodityDescription": "9 mm steel screws",
                  "countryOfManufacture": "US",       // not strictly required for USPS
                  "customsWeight": {
                      "weight": 4,
                      "weightUnit": "lb"
                  },
                  "quantity": 3,
                  "quantityUnitOfMeasurement": "box"  // required for UPS
              }
          ]
      }
  }
}

Definitions of API request fields for customs and international shipping

This section includes Shipium descriptions of API request fields common to customs and international shipping. All fields are included within customsInfo in the shipmentParameters (or multiParcelShipmentParameters for multi-parcel shipments) of your call, with the exception of shipOption, which is included at the shipmentParameters (or multiParcelShipmentParameters) level.

Importer of record and broker are not included here; the Broker & Importer of Record document provides details about these optional fields that can be included in your API call. Likewise, the Tax Identification Number document includes information about tax IDs that is not included here.

Ship option

The shipOption field is included in the shipmentParameters of the API call (or in multiParcelShipmentParameters for a multi-parcel shipment). You can find more information about ship options in our Ship Options documentation.

Request field

Details

shipOption

Type: String (enumeration)
Values: International24Hour, InternationalOneToThreeDayEarly, InternationalOneToThreeDay, InternationalTwoToFiveDay, InternationalTwoToTenDay, InternationalOneToTwoWeek, InternationalOneToFourWeek
Description: The kind of international shipment performance

Customs info

The customsInfo fields are included in the shipmentParameters (or in multiParcelShipmentParameters for a multi-parcel shipment) of the API call.

Required fields

Request field

Details

totalCustomsValue

Type: Float
Description: The total customs value of the package in total customs value currency units

totalCustomsValueCurrency

Type: String
Example: usd
Description: The currency to use for the package value in the totalCustomsValue field; this must be a valid ISO 4217 currency code.

customsDescription

Type: String
Example: 9 mm steel screws
Description: The detailed description of the items being shipped

reasonForExport

Type: String (enumeration)
Values: sale, gift, sample, returns, personal_effects
Description: The reason to export an international shipment

invoiceDate

Type: LocalDate
Description: Date when the invoice was created; ideally, this is the same as the ship date.

ultimateConsigneeAddress.countryCode

Type: String
Description: The ISO 3166-1 country code for the address

ultimateConsigneeAddress.postalCode

Type: String
Description: A country-appropriate postal code for the address

incoterm

Type: String (enumeration)
Values: cpt (carriage paid to), ddp (delivery duty paid), ddu (delivery duty unpaid), dap (delivered at place), dpu (delivered at place unloaded), exw (ex works), fca (free carrier), fob (free on board)
Description: The incoterm, or international commerce term, defines the delivery duty responsibility for buyers and sellers for any mode of transport; the default value is ddp.

customsItems

Type: Array
Description: Contains customs information for each item in the shipment. See the Customs Items tables for details.

Conditional fields

Request field

Details

ultimateConsigneeAddress

Type: Object
Condition: Required fields within this object vary by carrier.
Description: The address of the person or company who receives the goods for end use; if no value is sent, we will use the destinationAddress.

ultimateConsigneeAddress.phoneNumber

Type: String
Condition: Some carriers require a phone number.
Description: The phone number of the contact

b13AFilingOption

Type: String (enumeration)
Values: NOT_REQUIRED, MANUALLY_ATTACHED, FILED_ELECTRONICALLY, SUMMARY_REPORTING, CARRIER_TO_STAMP, UNKNOWN
Condition: Required for non-document shipments originating in Canada destined for any country other than Canada, the United States, Puerto Rico, or the U.S. Virgin Islands
Description: Specify the filing option being exercised.

electronicExportInformation.exportDate

Type: String (date-time)
Condition: Required if including EEI
Description: The date the goods will be leaving the country in ISO 8601 format

electronicExportInformation.pointOfOrigin

Type: String
Condition: Required if including EEI
Description: The 2-character state abbreviation from which the goods were shipped

Optional fields

Field

Details

invoiceNumber

Type: String
Description: The Commercial Invoice number, if the Commercial Invoice was generated by your organization

europeanUnionInfo.vendorIossNumber

Type: String
Description: An Import One-Stop-Shop (IOSS) number is a 12-digit identification number that is used to pay value added tax (VAT) and declare imports to the European Union (EU). The IOSS number is a type of VAT identification, but it is not the same as a resident VAT registration.

ultimateConsigneeAddress.name

Type: String
Description: The name associated with the address

ultimateConsigneeAddress .phoneNumberCountryCode

Type: String
Description: The country code of the phone number of the contact

ultimateConsigneeAddress.emailAddress

Type: String
Description: The email address of the contact

ultimateConsigneeAddress.company

Type: String
Description: The company name for the address

ultimateConsigneeAddress.street1

Type: String
Description: The first address line

ultimateConsigneeAddress.street2

Type: String
Description: The second address line

ultimateConsigneeAddress.city

Type: String
Description: The name of the city for the address

ultimateConsigneeAddress.state

Type: String
Description: The name of the state for the address

ultimateConsigneeAddress.addressType

Type: String (enumeration)
Values: commercial or residential
Description: The type of location for this address

ultimateConsigneeAddress .addressLineComponents

Type: Object
Description: The address line components for the address, used for some international shipments. The street1 and street2 fields should not be included if using addressLineComponents, or an error will be returned. Preferred for Mexican addresses. You can find out more about Mexican addresses in Non-U.S. Address Formats.

ultimateConsigneeType

Type: String (enumeration)
Values: direct_consumer, government_entity, reseller
Description: The type of the ultimate consignee, the person or company receiving the shipment; if no value is sent, it will default to direct_consumer.

soldTo

Type: Object
Description: The party who purchased the goods; this may differ from both the recipient and the importer of record. Some carriers, such as FedEx, require this information for certain customs filings. See Broker & Importer of Record for more details on customs parties.

soldTo.address

Type: Object
Description: The address of the sold-to party

soldTo.address.name

Type: String
Description: The name associated with the address

soldTo.address.company

Type: String
Description: The company name for the addres

soldTo.address.street1

Type: String
Description: The first address line

soldTo.address.street2

Type: String
Description: The second address line

soldTo.address.city

Type: String
Description: The name of the city for the address

soldTo.address.state

Type: String
Description: The 2-letter abbreviation of the state for the address

soldTo.address.postalCode

Type: String
Description: A country-appropriate postal code for the address

soldTo.address.countryCode

Type: String
Description: The ISO 3166-1 country code for the address

soldTo.address.phoneNumber

Type: String
Description: The phone number of the contact

soldTo.address.phoneNumberCountryCode

Type: String
Description: The country code of the phone number of the contact

soldTo.address.emailAddress

Type: String
Description: The email address of the contact

soldTo.address.addressType

Type: String (enumeration)
Values: commercial or residential
Description: The type of location for this address

soldTo.taxIdentificationNumbers

Type: Array
Description: Array of tax identification number objects for the sold-to party

soldTo.taxIdentificationNumbers.tinType

Type: String (enumeration)
Values: business_national, business_state, business_union, federal, personal_national, personal_state
Description: The type of tax identification number

soldTo.taxIdentificationNumbers.tinNumber

Type: String
Description: The tax identification number value

soldTo.taxIdentificationNumbers .tinIssuingCountry

Type: String
Description: The ISO 3166-1 country code of the country that issued the tax identification number

soldTo.accountNumber

Type: String
Description: The carrier account number information for the sold-to party

aesInternalTransactionNumber

Type: String
Description: The number received if the Electronic Export Information (EEI) was filed and has been accepted in the Automated Export System (AES)

electronicExportInformation

Type: Array
Description: Information for the Electronic Export Information (EEI) customs form, only used when the EEI will be filed directly by the carrier (i.e., not filed by your organization using AESDirect or otherwise)

exportComplianceStatement

Type: String
Example: AESX20220714987654
Description: For U.S. export shipments requiring an EEI, enter the ITN number received from AES when you filed your shipment or the FTR (Foreign Trade Regulations) exemption number. The proper format for an ITN number is AES XYYYYMMDDNNNNNN where YYYYMMDD is date and NNNNNN are numbers generated by the AES. For Canada export shipments, it can be proof of report number (15-32 alphanumeric), summary proof of report number (7-32 alphanumeric) or exemption number (2 digit) based on the selected b13AFilingOption.

permitNumber

Type: String
Description: This is a permit number. This field is applicable only to Canada export non-document shipments of any value to any destination. No special characters are allowed.

declarationStatement

Type: String
Example: I declare that the information provided is true and accurate. These commodities are licensed by the United States for export to the destination country.
Description: A customs declaration statement for the shipment that, if provided, will appear on generated commercial invoices

taxIdentificationNumber

Type: String
Description: The employer identification number (EIN) tax identification number of the shipper; you can find more details about this field in Tax Identification Number.

📘

Understanding soldTo vs. importerOfRecord

The soldTo field represents the party who purchased the goods, while importerOfRecord represents the party legally responsible for customs compliance. These may be the same entity or different parties depending on your shipping scenario. For detailed guidance on when to use each field, see Broker & Importer of Record.

Customs items

The customsItems fields are included within customsInfo in the API call.

Required fields

Request field

Details

customsValue

Type: Float
Description: The value of each individual item to report to customs in customs value currency

customsValueCurrency

Type: String
Description: The ISO 4217 currency code representing the totalCustomsValue

commodityDescription

Type: String
Description: A description of this product to be provided to customs

countryOfManufacture

Type: String
Description: The ISO 3166-1 country code for the address

customsWeight.weight

Type: Float
Description: The weight of the item to report to customs in units of weight unit

customsWeight.weightUnit

Type: String (enumeration)
Values: g, kg, lb, oz
Description: The weight unit

quantity

Type: Integer (int32)
Description: The number of units of this customs item

quantityUnitOfMeasurement

Type: String (enumeration)
Values: bag, barrel, box, case_of_goods, container, crate, cylinder, envelope, pallet, piece, roll, tube
Description: The unit of measurement of the item

harmonizedTariffNumber

Type: String
Description: The 6- to 15-digit Harmonized System Tariff classification code

Conditional fields

Request field

Details

electronicExportCommodityInformation .exportType

Type: String (enumeration)
Values: domestic or foreign
Condition: Required if including electronicExportInformation
Description: The type of the export

electronicExportCommodityInformation .exportInformationCode

Type: String
Condition: Required if including electronicExportInformation
Description: The 2-character export information code for the commodity

electronicExportCommodityInformation .scheduleBInformation

Type: Array
Condition: Required if including electronicExportInformation
Description: The Schedule B information for the commodity

electronicExportCommodityInformation .scheduleBInformation.scheduleBNumber

Type: String
Condition: Required if including electronicExportInformation
Description: The 10-digit Schedule B classification code for the item being exported

electronicExportCommodityInformation .scheduleBInformation.scheduleBQuantity

Type: Integer (int32)
Condition: Required if including electronicExportInformation
Description: The count of how many Schedule B units are in the shipment

electronicExportCommodityInformation .scheduleBInformation .scheduleBUnitOfMeasurement

Type: String (enumeration)
Values: barrels, carat, content_kilogram, square_centimeter, content_ton, curie, clean_yield_kilogram, dozen, dozen_pieces, dozen_pairs, fiber_meter, gross_container, gram, gross, hundred, kilogram, cubic_kilometer, kilogram_total_sugars, liter, meter, square_meter, cubic_meter, millicurie, number, pieces, proof_liter, pack, pairs, running_bales, square, ton, thousand, no_quantity_required
Condition: Required if including electronicExportInformation
Description: The unit of measure for the Schedule B quantity

electronicExportCommodityInformation .eccnNumber

Type: String
Condition: Required if including electronicExportInformation
Description: The 5-digit product Export Control Classification Number (ECCN) number as issued by the Bureau of Industry and Security; the format is #A###.

electronicExportCommodityInformation .exportLicenseInformation

Type: Array
Condition: Required if including electronicExportInformation
Description: The license information for the export

electronicExportCommodityInformation .exportLicenseInformation.licenseType

Type: String
Condition: Required if including exportLicenseInformation
Description: The standard license type code as published by the U.S. government

electronicExportCommodityInformation .exportLicenseInformation.exportLicense .licenseNumber

Type: String
Condition: Required if including exportLicense
Description: The license number

electronicExportCommodityInformation .exportLicenseInformation.exportLicense .licenseLineValue

Type: Integer (int32)
Condition: Required if including exportLicense
Description: The export monetary amount allowed per license

electronicExportCommodityInformation .exportLicenseInformation.exportLicense .licenseExpiration

Type: String (date-time)
Condition: Required if including exportLicense
Description: The license expiration date in ISO 8601 format

Optional fields

Request field

Details

productId

Type: String
Description: The unique identifier for the product being shipped. This value must match the productId in orderItemQuantities for certain international carriers. See Carrier-Specific Requirements for details.

commodityPartNumber

Type: String
Description: The part number or reference number for the product

marksAndNumbers

Type: String
Description: Any special marks, codes, and numbers that may identify the package

electronicExportCommodityInformation

Type: Array Description: Customs item information that is particular to the Electronic Export Information (EEI), only used when the EEI will be filed directly by the carrier (i.e., not filed by the partner using AES Direct or otherwise)

electronicExportCommodityInformation .exportLicenseInformation.licenseExemptionCode

Type: String
Description: The license exemption code, if the license type does not require a license number

electronicExportCommodityInformation .exportLicenseInformation.exportLicense

Type: Array
Description: The export license, if the license type requires a valid license

Resources

Your Shipium team member is available to help along the way. However, you might find these resources helpful: