Carrier Packaging
Most carriers support their own package types, each with a specific package_id
and package_code
that you define in the packages
object for a shipment. While the package_id
and package_code
properties are not required by ShipStation API, most carriers will require at least the package_code
to successfully return a label. Additionally, the carrier package you use can affect things like your rate (e.g., a USPS Flat Rate box will have a different rate than a generic package).
To see what types of packages your carrier supports and the associated properties, you can use the list carrier packages request.
Carrier packaging is distinct from using custom package types, which are custom packages where you define the package properties in advance, including dimensions, and only add the package_code
to the packages
object.
Example Request
This create label example uses the USPS Priority Mail service with a medium flat rate box package type. In the case of flat rate boxes, you will declare package weight (to ensure the shipment does not exceed the flat rate maximum) but would not declare package dimensions.
POST /v1/labels/
In the creat label response, the package_code
property will be a property in both the shipment
object and the packages
object. In the create shipment response, the package_code
property will be in the packages
object only.