Custom Package Types
If you have your own custom packaging with specific dimensions that you use frequently (either in place of or in addition to carrier defined packages), you might find it helpful to define those custom package types to use more easily in your shipments. You can then simply include the package_code
property in your shipment object, instead of the individual dimension properties.
Define a Package Type
You can define as many package types as you need, each with their own name, package code, and set of dimensions.
Requirements
The following properties are required in the request body when creating a custom package type:
Property | Type | Description |
---|---|---|
package_code | string | Max 50 characters. This is the code you will use in your shipment objects. Each custom package must add the prefix custom_ to the package_code or the request will be rejected with a HTTP 400, Bad Request status. |
name | string | Max 50 characters. Any custom name you choose to help identify the package. |
dimensions | Object | Requires the unit , length , width , and height properties |
Optional Properties
You can also include a package_id
, which is a string (max 25 characters) that uniquely identifies the package, and a description
, a string of up to 500 characters.
Example Request & Response
POST /v1/packages/
Response
The response will simply include all of the packages defined properties.
List Package Types
List your package types to get a response with an array of all the available custom packaging available in your account.
Example Request & Response
GET /v1/packages
Response
Delete Package Types
Deleting a package will not disassociate it from any shipments. It will merely stop being available for use with future shipments and it will will no longer be included in the list packages response.
You will need the package_id
of the custom package you wish to delete.
Example Request & Response
DELETE /v1/packages/:package_id
Response
If successful, you'll receive an HTTP Status 204, No Content response.