Shipment
Main shipment object containing all necessary data to create a shipment. Either parcel or parcels must be provided, but not both.
- fromType: object
_address requiredCan be specified by ID or attributes to create a new one, and be verified inline. See Create an Address
- countryType: stringrequired
ISO 3166 country code for the country the address is located in
- stateType: stringrequired
State or province the address is located in
- zipType: stringrequired
ZIP or postal code the address is located in
- cityType: string
City the address is located in
- companyType: string | null
Name of the organization. Both name and company can be included
- emailType: string | nullFormat: email
Email to reach the person or organization
- nameType: string | null
Name of the person. Both name and company can be included
- phoneType: string
Phone number to reach the person or organization
- residentialType: boolean | null
Whether or not this address would be considered residential
- street1Type: string
First line of the address. Note: For U.S. and CA addresses, if street1 exceeds 35 characters, street2 is empty, and the end of street1 contains a recognized unit number format (e.g., “Apt 10”, or “Unit #99833”), the unit number is moved to street2
- street2Type: string
Second line of the address. Note: May be automatically populated if a unit number is moved from street1 during address verification
- toType: object
_address requiredCan be specified by ID or attributes to create a new one, and be verified inline. See Create an Address
- countryType: stringrequired
ISO 3166 country code for the country the address is located in
- stateType: stringrequired
State or province the address is located in
- zipType: stringrequired
ZIP or postal code the address is located in
- cityType: string
City the address is located in
- companyType: string | null
Name of the organization. Both name and company can be included
- emailType: string | nullFormat: email
Email to reach the person or organization
- nameType: string | null
Name of the person. Both name and company can be included
- phoneType: string
Phone number to reach the person or organization
- residentialType: boolean | null
Whether or not this address would be considered residential
- street1Type: string
First line of the address. Note: For U.S. and CA addresses, if street1 exceeds 35 characters, street2 is empty, and the end of street1 contains a recognized unit number format (e.g., “Apt 10”, or “Unit #99833”), the unit number is moved to street2
- street2Type: string
Second line of the address. Note: May be automatically populated if a unit number is moved from street1 during address verification
- buyerType: object
_address The buyer's address, defaults to to_address
- countryType: stringrequired
ISO 3166 country code for the country the address is located in
- stateType: stringrequired
State or province the address is located in
- zipType: stringrequired
ZIP or postal code the address is located in
- cityType: string
City the address is located in
- companyType: string | null
Name of the organization. Both name and company can be included
- emailType: string | nullFormat: email
Email to reach the person or organization
- nameType: string | null
Name of the person. Both name and company can be included
- phoneType: string
Phone number to reach the person or organization
- residentialType: boolean | null
Whether or not this address would be considered residential
- street1Type: string
First line of the address. Note: For U.S. and CA addresses, if street1 exceeds 35 characters, street2 is empty, and the end of street1 contains a recognized unit number format (e.g., “Apt 10”, or “Unit #99833”), the unit number is moved to street2
- street2Type: string
Second line of the address. Note: May be automatically populated if a unit number is moved from street1 during address verification
- carrierType: string | null
Carrier to use for the shipment. If omitted along with carrier_accounts, all carriers are considered
- carrierType: array string[] | null
_accounts List of CarrierAccount IDs
- customsType: object
_info Information for processing the package through international customs
- contentsType: string
_explanation Human readable description of content, max 255 characters. Required for certain carriers and always required if contents_type is 'other'
- contentsType: stringenum
_type Possible values:
values- documents
- gift
- merchandise
- returned
_goods - sample
- dangerous
_goods - humanitarian
_donation - other
- customsType: boolean
_certify Electronically certify the information provided
- customsType: array object[] · CustomsItem[]
_items Describes products being shipped
An item included in the shipment for customs declaration purposes
- customsType: string
_signer Required if customs_certify is true
- eelType: string
_pfc When shipping outside the US, you must provide either an Exemption and Exclusion Legend (EEL) code or a Proof of Filing Citation (PFC). Which one you need depends on the value of the goods:
- If the value is less than $2,500, pass the EEL code:
NOEEI 30.37(a). - If the value is greater than $2,500, you must obtain an Automated Export System (AES) Internal Transaction Number (ITN) from AESDirect, e.g.
AES X20120502123456.
An ITN is required for any international shipment valued over $2,500 and/or requiring an export license unless an exemption applies.
Note: The maximum number of items that can be included in
customs_infowith UPS is 100 - If the value is less than $2,500, pass the EEL code:
- idType: string
Unique, begins with 'cstinfo_'
- nonType: stringenum
_delivery _option Possible values:
values- abandon
- return
- restrictionType: string | null
_comments Required if restriction_type is not 'none'
- restrictionType: stringenum
_type Possible values:
values- none
- quarantine
- sanitary
_phytosanitary _inspection - other
- isType: boolean | null
_return Set true to create as a return shipment
- optionsType: object | null
Additional shipment options. If
carrier_accountsandserviceare set andoptions.create_and_buyis not explicitly false, it is treated as true.- additionalType: boolean | null
_handling Whether the package requires additional handling
- carbonType: boolean | null
_neutral Request carbon neutral delivery
- carrierType: number | null
_insurance _amount Declared insurance value for the carrier
- commercialType: string | null
_invoice _letterhead Header text for the commercial invoice
- commercialType: string | null
_invoice _signature Signature for the commercial invoice
- createType: boolean | null
_and _buy Immediately buy a label. Mutually exclusive with
create_and_buy_cheapest - createType: boolean | null
_and _buy _cheapest Automatically buy the cheapest rate. Mutually exclusive with
create_and_buy - deliveryType: string | nullenum
_confirmation Delivery confirmation type
values- N
O _ S I G N A T U R E - S
I G N A T U R E - S
I G N A T U R E _ R E S T R I C T E D - A
D U L T _ S I G N A T U R E - A
D U L T _ S I G N A T U R E _ R E S T R I C T E D
- dropoffType: string | nullFormat: date_time
_max _datetime Latest acceptable drop-off time
- dropoffType: string | null
_type Dropoff type (e.g., REGULAR_PICKUP, SCHEDULED_PICKUP)
- dutyType: object | null
_payment Duties/taxes billing information
- dutyType: string | null
_payment _account Account ID to use for duty/tax payment
- endorsementType: string | null
Return instruction (e.g., RETURN_SERVICE_REQUESTED)
- fetchType: boolean | null
_express _delivery _date Request express delivery date from carrier
- hazmatType: string | nullenum
Indicates hazardous material
values- P
R I M A R Y _ C O N T A I N E D - P
R I M A R Y _ P A C K E D - P
R I M A R Y - S
E C O N D A R Y _ C O N T A I N E D - S
E C O N D A R Y _ P A C K E D
- incotermType: string | null
Incoterm for the shipment (e.g., DDP, DAP)
- isType: boolean | null
_return Indicates whether the shipment is a return
- labelType: string | nullFormat: date
_date Date to appear on the shipping label
- labelType: string | null
_format Label file format (e.g., PDF, ZPL)
- labelType: string | null
_request _source Source of the label request (e.g., api)
- labelType: string | nullenum
_size Label size (e.g., 4x6)
values- 4x6
- 8
.5x11 - L
E T T E R
- machinableType: boolean | null
Whether the parcel is machinable (USPS)
- parcelsType: boolean | null
_response Whether to include parcels in the response
- paymentType: object | null
Postage billing information
- pickupType: string | nullFormat: date_time
_max _datetime Latest acceptable pickup time
- pickupType: string | nullFormat: date_time
_min _datetime Earliest acceptable pickup time
- postageType: boolean | null
_label _inline Whether to return the label inline in the response
- printType: string | null
_custom Custom print field (carrier-specific)
- printType: string | null
_custom _1 Custom print field 1
- printType: string | null
_custom _2 Custom print field 2
- printType: string | null
_custom _3 Custom print field 3
- saturdayType: boolean | null
_delivery Request Saturday delivery
- specialType: string | null
_rates _eligibility Special rate plan (e.g., usps.connect)
- suppressType: boolean | null
_etd Whether to suppress estimated delivery time
- parcelType: object
The dimensions and weight of the package. Business rule:
parcelandparcelsMUST NOT both be present.- heightType: number | null
Height of the parcel (optional; must be sent with length + width if sent)
- idType: string | null
Unique parcel identifier (required if weight is not provided)
- itemsType: array object[] | null · LineItem[]
Line items inside the parcel
Individual item contained within a parcel
- lengthType: number | null
Length of the parcel (optional; must be sent with width + height if sent)
- predefinedType: string | nullenum
_package Carrier-specific predefined package type
values- C
A R D - F
E D E X10 K G B O X - F
E D E X25 K G B O X - F
E D E X E N V E L O P E - F
E D E X E X T R A L A R G E B O X
- weightType: number | null
Total package weight (required unless id is provided)
- widthType: number | null
Width of the parcel (optional; must be sent with length + height if sent)
- parcelsType: array object[] | null · Parcel[]
Array of parcels. Business rule:
parcelandparcelsMUST NOT both be present.The dimensions and weight of the package.
Rules (not enforced by JSON schema):
-
You may either:
• Provide only
id• OR omitidand provideweight(dimensions optional) - If any of
length,width, orheightis provided, all three must be provided.
- heightType: number | null
Height of the parcel (optional; must be sent with length + width if sent)
- idType: string | null
Unique parcel identifier (required if weight is not provided)
- itemsType: array object[] | null · LineItem[]
Line items inside the parcel
Individual item contained within a parcel
- lengthType: number | null
Length of the parcel (optional; must be sent with width + height if sent)
- predefinedType: string | nullenum
_package Carrier-specific predefined package type
values- C
A R D - F
E D E X10 K G B O X - F
E D E X25 K G B O X - F
E D E X E N V E L O P E - F
E D E X E X T R A L A R G E B O X
- weightType: number | null
Total package weight (required unless id is provided)
- widthType: number | null
Width of the parcel (optional; must be sent with length + height if sent)
-
You may either:
• Provide only
- referenceType: string | null
An optional field that may be used in place of id in other API endpoints
- returnType: object
_address The shipper's address, defaults to from_address
- countryType: stringrequired
ISO 3166 country code for the country the address is located in
- stateType: stringrequired
State or province the address is located in
- zipType: stringrequired
ZIP or postal code the address is located in
- cityType: string
City the address is located in
- companyType: string | null
Name of the organization. Both name and company can be included
- emailType: string | nullFormat: email
Email to reach the person or organization
- nameType: string | null
Name of the person. Both name and company can be included
- phoneType: string
Phone number to reach the person or organization
- residentialType: boolean | null
Whether or not this address would be considered residential
- street1Type: string
First line of the address. Note: For U.S. and CA addresses, if street1 exceeds 35 characters, street2 is empty, and the end of street1 contains a recognized unit number format (e.g., “Apt 10”, or “Unit #99833”), the unit number is moved to street2
- street2Type: string
Second line of the address. Note: May be automatically populated if a unit number is moved from street1 during address verification
- serviceType: string | null
Requested service level (e.g., Priority, Express, GroundAdvantage)