Skip to content
Last updated

Parameter Guide for Additional Features

This section outlines the additional parameters required for special shipping scenarios when using the Get Rate and Directly Buy Label APIs. It serves as a reference to ensure all necessary information is provided for accurate rate calculation and successful label creation. Topics include:

  • How to Provide Customs Form Data

  • How to Declare Shipment Insurance

  • How to Include Hazardous Material Information


🛃 How to Provide Customs Form Data

Customs forms are typically required for international shipments or shipments to certain U.S. territories and special addresses, such as Guam, Puerto Rico, and U.S. military addresses (APO/FPO/DPO). These destinations are treated as international in the postal system and require customs declaration information.

  • Signing person - signing_person(required)
    Full name of the person signing the customs declaration form. This is a required field and is typically the sender or an authorized representative

  • Goods detailsitem_data_list(required)
    Provide an array of item lines. All fields are required except hs_tariff_number.

    • description, quantity, origin, weight, unit_cost, weight_unit — required
    • hs_tariff_number — optional (recommended)
  • Contents type & non-delivery option - content_type & undeliverable_option(required)
    Indicate what the shipment contains and how to handle undeliverable items. Valid enum values are defined in the API reference.

  • U.S. Export compliance (EEI)eel_pfc_type & eel_pfc_code (optional)
    Provide one of the following pairs based on total shipment value:

    • Value > $2500 (ITN required)
    "eel_pfc_type": "ITN",
    "eel_pfc_code": "X20240427123456"
    • Value ≤ $2500 (use an exemption code)
    "eel_pfc_type": "EXEMPTION_CODE",
    "eel_pfc_code": "NOEEI 30.37(a)"

    Default: eel_pfc_type = EXEMPTION_CODE, eel_pfc_code = NOEEI 30.37(a)

  • Tax IDstax_ids (optional)
    Country-specific tax IDs for customs clearance. Required for shipments to Mexico; otherwise optional (destination-dependent). Enum/types and formats are listed in the API reference.


💰 How to Declare Shipment Insurance

If you want to insure your shipment, you must declare the insured value in USD.

  1. Step 1 – Get an insurance quote
  • Call the /api/shipment/insurance/rate endpoint.
  • Provide the service_level and declared_value in the request.
  • The returned quote is directly linked to both the service level and the declared value you provide.
  1. Step 2 – Purchase insurance with the shipment
  • When buying the label, include the insurance_data object in the request to /api/shipment/create_and_pay or /api/shipment/shein/direct_buy.
  • The service_level used in this step must match exactly the service_level used in Step 1 when obtaining the quote — mismatches will result in an error.
Important Notes
  1. If the service level changes between quoting and purchasing, the insurance purchase request will fail.
  2. The declared value determines the coverage amount in case of loss or damage.

☠️ How to Include Hazardous Material Information

To declare a shipment as containing hazardous materials:

  1. Set the field In the option_data.hazardous_materials field, pass true. This option is only supported for shipments using USPS Ground Advantage service level.

  2. Label display When hazardous materials are declared, the generated shipping label will have a special display/marking. Refer to the image below for an example label format.

Image description
  1. Reference documentation For more information about hazardous materials shipping rules, classifications, and restrictions, see: Hazardous Shipping 101 with USPS.