Packaging Planner
Learn how to use Shipium's Packaging Planner API to optimize your organization's shipment packaging.
About the Packaging Planner API
Selecting the best box available for a shipment can present challenges. The Packaging Planner application programming interface (API) simplifies this process by configuring the boxes you need for your shipment.
There are three ways to call the Packaging Planner API:
- With Full Linear Dimensions. This method requires no additional configuration of your Shipium account to make calls to the API. You simply include the dimensions of packaging and shipment contents in the API call.
- With Packaging IDs. You establish packaging IDs for your most common box sizes and then include the
packagingId
value(s) in the API call. - With Package Set ID. You group common box size configurations into sets and then include the
packageSetId
value(s) in the API call. This method could be beneficial if your fulfillment center has a specific set of boxes available that you can refer to in each API call.
This document provides guidance for each use case. When including full linear dimensions for a shipment's contents, no additional configuration is required. However, if your organization includes an identification for a package or a package set, you'll need to configure your Shipium account in order to call the Packaging Planner API successfully.
Getting started with Shipium
If your organization doesn't already have a Shipium account, you'll want to visit Getting Started with Shipium to set up your account before you can use the Packaging Planner API.
The following section includes instructions for enabling your account to be able to call the APIs with packaging IDs or packaging set IDs.
Configuring your account to enable use of the Packaging Planner API (with packaging IDs or packaging set ID)
To start using the Packaging Planner API by including packaging IDs or packaging set IDs, you’ll need to complete the following steps. First, you'll need to access the Shipium Console.
For configuration of either packaging IDs or packaging set IDs, you'll start by navigating to Configure and then Fulfillment Configuration in the lefthand menu.

Packaging IDs
Within Fulfillment Configuration, you'll scroll to the Packaging Configuration category, which includes Packaging.

After selecting Packaging, you'll complete the following steps to establishing packaging standards for your organization.
- Select the + Add Packaging button at the bottom of the + Add Packaging card, or select the + icon at the top left of the card.

- You'll need to provide the required information about your packaging type(s). If you need assistance estimating packaging weight information, you might find the technical specifications for typical box sizes from Uline helpful.

- Linear Unit. You'll select centimeters or inches as your unit of measurement from the dropdown menu.
- Weight Unit. You'll select kilograms or pounds as your unit of weight from the dropdown menu.
- Packaging Length. This is the numerical value of the longest side of your package.
- Packaging Width. This is the numerical value of the second longest side of your package.
- Packaging Height. This is the numerical value of the shortest side of your package.
- Packaging Weight. This is the numerical value of the estimated weight of your package.
- Max Content Weight. This is the numerical value of the estimated maximum weight of the entirety of contents typically packed into a shipment of this packaging size for your organization.
- Packaging Material. You'll select box, envelope, or flat pack as your packaging type from the dropdown menu.
- Unsupported Product Details. You can optionally designate types of products as restricted from this packaging type by selecting ORMD (Other Regulated Materials—Domestic), LIO (Lithium-Ion), or Fragile from the dropdown menu.
- Name. The name is what you want to call this packaging setup. The package dimensions and package type auto-populate in this field. Shipium recommends keeping this value as the name and appending it with additional identifying information.
- Description. You can provide an optional description to help organize your packaging.
Next, you'll have an opportunity to review the Add Packaging Summary before saving the new packaging.

Obtain the packagingId value needed for the API call
- To retrieve the
packagingId
value to pass in the API call, you'll need to access the details of your newly created packaging by selecting Detail within its card on your Packaging homepage.

- The Packaging ID value to copy is located near the top left of the details screen, as shown in the following screenshot. You'll include this value as the
packagingId
when calling Shipium's APIs.

Packaging Set IDs
Within Fulfillment Configuration, you'll scroll to the Packaging Configuration category, which includes Packaging Set.

After selecting Packaging Set, you'll complete the following steps to establish packaging sets for your organization.
- Select the + Add Packaging Sets button at the bottom of the + Add Packaging Set card, or select the + icon at the top left of the card.

- You'll need to provide the required information about your packaging type(s):

- Name. The name is what you want to call this packaging set. Shipium recommends including the name of the facility that uses this packaging.
- Description. You can provide an optional description to help organize your packaging sets.
- Packaging Select. From the dropdown menu, you'll choose the packaging you created when adding new packaging that you wish to include in this packaging set.

Next, you'll have an opportunity to review the Add Packaging Set Summary before saving the new packaging set.

Obtain the packagingSetId value needed for the API call
- To retrieve the
packagingSetId
value to pass in the API call, you'll need to access the details of your newly created packaging set by selecting Detail within its card on your Packaging Set homepage.

- The Packaging Set ID value to copy is located near the top left of the details screen, as shown in the following screenshot. You'll include this value as the
packagingSetId
when calling Shipium's APIs.

Retrieve packaging guidance from the API
The Shipium Packaging Planner API assumes you're using one of the authentication mechanisms detailed in our authentication documentation. The endpoint for Packaging Planner API calls is included in the table below.
API type | API endpoint |
---|---|
POST | /api/v1/packaging/planner |
Authentication for API Calls
In the cURL examples on this page, the environment variable
AUTHSTRING
is used to handle authorization. The recipe below shows how to set it correctly for both API Key and OAuth users.
Testing the API call
The ping endpoint for testing your API call is included in the following table.
API type | API endpoint |
---|---|
GET | /api/v1/packaging/ping |
Successfully calling the API endpoint will result in the following 200 response.
{
"info": "pong",
"status": 1
}
An error calling the API endpoint will result in the following 400 response.
{
"statusCode": 401,
"code": "ERR_BAD_REQUEST",
"error": "Unauthorized",
"message": "Request failed with status code 401"
}
Shipium assumptions for the Packaging Planner API
- Package and content properties
All items being packed and all packages being packed into are three-dimensional, solid, rectangular objects or can be represented as such.
Response attributes for all use cases calling the Packaging Planner API
The Packaging Planner response attributes for passing full linear dimensions, packaging IDs, and packaging set IDs in the API call are defined in the following table.
Response attribute | Description |
---|---|
packageCount | The number of boxes that the items were packed into. This will be 1 unless the items are evaluated not to fit into the largest box available. The prioritization is the use of one box. |
packages | The boxes that were selected and the items that were packed into each box |
packages.linearDimensions | Linear dimensions and unit of measurement of the box available for items to be packed into |
packages.linearDimensions.length | The numerical value of the longest side of the box |
packages.linearDimensions.width | The numerical value of the second longest side of the box |
packages.linearDimensions.height | The numerical value of the shortest side of the box |
packages.linearDimensions.linearUnit | Units dimensions specified in either centimeters or inches |
packages.maxContentWeight | Maximum total combined weight of the items packed into the box |
packages.maxContentWeight.weight | Maximum weight of the packed items |
packages.maxContentWeight.weightUnit | The unit of measurement the maximum weight is specified in |
packages.packageContents | A list of the items packed into the box |
packages.packageEstimatedWeight | The estimated weight of the packed box and all its contents |
packages.packageEstimatedWeight.weight | The weight of the packed box |
packages.packageEstimatedWeight.weightUnit | The unit of measurement the estimated weight is specified in |
packages.packagingTypeId | The Shipium ID value for the packaging that was selected Note: This response attribute is only returned when calling the API with Packaging ID(s) or Packaging Set ID(s). |
packages.packagingSizeName | The name assigned to the specified box size |
packages.packagingWeight | The weight of the empty packaging |
packages.packagingWeight.weight | The weight of the unpacked, empty box |
packages.packagingWeight.weightUnit | The unit of measurement the packaging weight is specified in |
volumetricPackEfficiency | Calculation of the entire volume of packed items and the selected box's available volume |
Retrieve packaging guidance by including full linear dimensions in the API call (primary use case)
The following table provides all required and optional fields for calling the Packaging Planner API with full linear dimensions of your package contents. You can find additional support in the Packaging Planner API Reference.
Request field | Required/Optional | Field type | Description |
---|---|---|---|
items | Required | An array of Item entities. | A list of the items to be packed into an available box |
includeDetails | Required | Boolean Limited to true , false , or empty. Defaults to true , which results in full linear dimensions of the items being returned in the API call response | A flag indicating whether to include dimensional details of the items to be packed in the API call response |
packaging | Required | Packaging Must contain at least one item | Dimensions and restrictions for available boxes to pack the items into |
packaging.linearDimensions | Required | Linear Dimension | The linear dimensions and unit of a box available for packing |
packaging.linearDimensions.length | Required | Decimal Limited to a value greater than zero | Length of the longest side of the box to be packed |
packaging.linearDimensions.width | Required | Decimal Limited to a value greater than zero | Length of the second longest side of the box to be packed |
packaging.linearDimensions.height | Required | Decimal Limited to a value greater than zero | Length of the shortest side of the box to be packed |
packaging.linearDimensions.linearUnit | Required | String Limited to inch (in) or centimeter (cm) | The unit of measurement the linear dimensions of the box are specified in |
packaging.maxContentWeight | Required | Weight | The maximum total combined weight of the items packed into the box |
packaging.maxContentWeight.weight | Required | Decimal Limited to a positive value | The maximum weight of all the packed items |
packaging.maxContentWeight.weightUnit | Required | String enumeration Limited to either pound ( lb ) or kilogram (kg ) | The unit of measurement the maximum weight is specified in |
packaging.packagingWeight | Required | Weight | The weight of the empty box |
packaging.packagingWeight.weight | Required | Decimal Limited to a positive value | The weight of the empty box |
packaging.packagingWeight.weightUnit | Required | String enumeration Limited to either pound ( lb ) or kilogram (kg ) | The unit of measurement the empty box weight is specified in |
packaging.unsupportedProductDetails | Optional | String enumeration Limited to ormd (Other Regulated Materials—Domestic), li (Lithium-Ion), or fragile | Restricted product types that cannot be packed into this box (e.g., hazmat) |
Example cURL call
curl --request POST
--url https://api.shipium.com/api/v1/packaging/planner
--header 'accept: application/json'
--header $AUTHSTRING
--header 'content-type: application/json'
--data 'INSERT REQUEST BODY FROM BELOW'
Example request body
{
"packaging": [
{
"linearDimensions": {
"height": 1,
"length": 1,
"linearUnit": "in",
"width": 1
},
"maxContentWeight": {
"weight": 50,
"weightUnit": "lb"
},
"packagingMaterial": "box",
"packagingSizeName": "1x1x1",
"packagingWeight": {
"weight": 1,
"weightUnit": "lb"
}
},
{
"linearDimensions": {
"height": 10,
"length": 10,
"linearUnit": "in",
"width": 10
},
"maxContentWeight": {
"weight": 50,
"weightUnit": "lb"
},
"packagingMaterial": "box",
"packagingSizeName": "10x10x10",
"packagingWeight": {
"weight": 1,
"weightUnit": "lb"
}
},
{
"linearDimensions": {
"height": 6,
"length": 6,
"linearUnit": "in",
"width": 6
},
"maxContentWeight": {
"weight": 50,
"weightUnit": "lb"
},
"packagingMaterial": "box",
"packagingSizeName": "6x6x6",
"packagingWeight": {
"weight": 1,
"weightUnit": "lb"
}
}
],
"items": [
{
"productLinearDimensions": {
"width": 2,
"length": 2,
"height": 2,
"linearUnit": "in"
},
"productId": "item1",
"productWeight": {
"weight": 2,
"weightUnit": "oz"
},
"quantity": 1
},
{
"productLinearDimensions": {
"width": 4,
"length": 4,
"height": 4,
"linearUnit": "in"
},
"productId": "item2",
"productWeight": {
"weight": 1,
"weightUnit": "oz"
},
"quantity": 1
}
]
}
Example standard response
{
"packageCount":1,
"unpackableItems":[],
"packages":[
{
"linearDimensions":{
"linearUnit":"in",
"length":5.5,
"height":5,
"width":5
},
"maxContentWeight":{
"weight":100,
"weightUnit":"oz"
},
"packagingWeight":{
"weight":2,
"weightUnit":"oz"
},
"packagingMaterial":"box",
"packagingSizeName":"5x5x5",
"packageEstimatedWeight":{
"weight":3,
"weightUnit":"oz"
},
"packageContents":[
{
"productLinearDimensions":{
"width":1,
"length":2,
"height":1,
"linearUnit":"in"
},
"productId":"item2",
"productWeight":{
"weight":2,
"weightUnit":"oz"
},
"quantity":2,
"productDetails":[
]
}
]
}
],
"volumetricPackEfficiency":46.55
}
Example response for unpackable items
{
"packageCount":1,
"unpackableItems":[
{
"productLinearDimensions":{
"width":100,
"length":200,
"height":100,
"linearUnit":"in"
},
"productId":"bigolproductthatisstillsomehow2oz",
"productWeight":{
"weight":2,
"weightUnit":"oz"
},
"quantity":1,
"productDetails":[
]
}
],
"packages":[
{
"linearDimensions":{
"linearUnit":"in",
"length":5.5,
"height":5,
"width":5
},
"maxContentWeight":{
"weight":100,
"weightUnit":"oz"
},
"packagingWeight":{
"weight":2,
"weightUnit":"oz"
},
"packagingMaterial":"box",
"packagingSizeName":"5x5x5",
"packageEstimatedWeight":{
"weight":3,
"weightUnit":"oz"
},
"packageContents":[
{
"productLinearDimensions":{
"width":1,
"length":2,
"height":1,
"linearUnit":"in"
},
"productId":"item2",
"productWeight":{
"weight":2,
"weightUnit":"oz"
},
"quantity":2,
"productDetails":[
]
}
]
}
],
"volumetricPackEfficiency":46.55
}
Example response for unpackable items and request to not include product details in response
{
"packageCount":1,
"unpackableItems":[
{
"productId":"bigolproductthatisstillsomehow2oz",
"quantity":1,
}
],
"packages":[
{
"linearDimensions":{
"linearUnit":"in",
"length":5.5,
"height":5,
"width":5
},
"maxContentWeight":{
"weight":100,
"weightUnit":"oz"
},
"packagingWeight":{
"weight":2,
"weightUnit":"oz"
},
"packagingMaterial":"box",
"packagingSizeName":"5x5x5",
"packageEstimatedWeight":{
"weight":3,
"weightUnit":"oz"
},
"packageContents":[
{
"productId":"item2",
"quantity":2,
}
]
}
],
"volumetricPackEfficiency":46.55
}
Retrieve packaging guidance by including packaging IDs in the API call
The following table provides all required and optional fields for calling the Packaging Planner API with packaging ID(s). You can find additional support in the Packaging Planner API Reference.
Request field | Required/Optional | Field properties | Description |
---|---|---|---|
includeDetails | Required | Boolean Boolean Limited to TRUE, FALSE, or empty. Defaults to TRUE, which results in full linear dimensions of the items being returned in the API call response | A flag indicating whether to include dimensional details of the items to be packed in the API call response |
items | Required | Item | A list of the items to be packed into an available box |
packagingIds | Required | array of String values Limited to valid IDs found within the Shipium platform | A list of strings representing the Shipium generated ID of a packaging asset configured through the Shipium console |
Example cURL call
curl
curl --request POST
--url https://api.shipium.com/api/v1/packaging/planner
--header 'accept: application/json'
--header $AUTHSTRING
--header 'content-type: application/json'
--data 'INSERT REQUEST BODY FROM BELOW'
Example request body
{
"packagingIds": ["4610efde-2270-449e-a187-cd18b4e8316b","5463ceca-15f4-11ee-be56-0242ac120002"],
"items": [
{
"productLinearDimensions": {
"width": 2,
"length": 2,
"height": 2,
"linearUnit": "in"
},
"productId": "item1",
"productWeight": {
"weight": 2,
"weightUnit": "oz"
},
"quantity": 1
},
{
"productLinearDimensions": {
"width": 4,
"length": 4,
"height": 4,
"linearUnit": "in"
},
"productId": "item2",
"productWeight": {
"weight": 1,
"weightUnit": "oz"
},
"quantity": 1
}
]
}
Example standard response
{
"packageCount":1,
"packages":[
{
"linearDimensions":{
"linearUnit":"in",
"length":5.5,
"height":5,
"width":5
},
"maxContentWeight":{
"weight":100,
"weightUnit":"oz"
},
"packagingWeight":{
"weight":2,
"weightUnit":"oz"
},
"packagingMaterial":"box",
"packagingSizeName":"5x5x5",
"packageEstimatedWeight":{
"weight":3,
"weightUnit":"oz"
},
packagingTypeId: "5463ceca-15f4-11ee-be56-0242ac120002",
"packageContents":[
{
"productLinearDimensions":{
"width":1,
"length":2,
"height":1,
"linearUnit":"in"
},
"productId":"item2",
"productWeight":{
"weight":2,
"weightUnit":"oz"
},
"quantity":2,
"productDetails":[
]
}
]
}
],
"volumetricPackEfficiency":46.55
}
Example response for request to not include product details in response
{
"packageCount":1,
"packages":[
{
"linearDimensions":{
"linearUnit":"in",
"length":5.5,
"height":5,
"width":5
},
"maxContentWeight":{
"weight":100,
"weightUnit":"oz"
},
"packagingWeight":{
"weight":2,
"weightUnit":"oz"
},
"packagingMaterial":"box",
"packagingSizeName":"5x5x5",
"packageEstimatedWeight":{
"weight":3,
"weightUnit":"oz"
},
packagingTypeId: "5463ceca-15f4-11ee-be56-0242ac120002",
"packageContents":[
{
"productId":"item2",
"quantity":2
}
]
}
],
"volumetricPackEfficiency":46.55
}
Retrieve packaging guidance by including packaging set IDs in the API call
The following table provides all required and optional fields for calling the Packaging Planner API with packaging set ID(s). You can find additional support in the Packaging Planner API Reference.
Request field | Required/Optional | Field properties | Description |
---|---|---|---|
includeDetails | Required | Boolean Boolean Limited to TRUE, FALSE, or empty. Defaults to TRUE, which results in full linear dimensions of the items being returned in the API call response | A flag indicating whether to include dimensional details of the items to be packed in the API call response |
items | Required | Item | A list of the items to be packed into an available box |
items.productDetails | Optional | String Limited to ORMD (Other Regulated Materials—Domestic), LIO (Lithium-Ion), or Fragile | Product details that could affect the boxes available to pack the items into, due to box type restrictions for shipping these types of products |
items.productId | Required | String Required when products cannot fit into a single box and need to be split into two boxes | Identifier for the product being packed |
items.productLinearDimensions | Required | Linear Dimension | The linear dimensions and unit of an item to be packed |
items.productLinearDimension.length | Required | Decimal Limited to a value greater than zero | Length of the longest side of the item to be packed |
items.productLinearDimension.width | Required | Decimal Limited to a value greater than zero | Length of the second longest side of the item to be packed |
items.productLinearDimension.height | Required | Decimal Limited to a value greater than zero | Length of the shortest side of the item to be packed |
items.productLinearDimension.linearUnit | Required | String Limited to inch (in) or centimeter (cm) | The unit of measurement the size of the item to be packed is specified in |
items.productWeight | Required | Weight | The weight of the item to be packed |
items.productWeight.weight | Required | Decimal Limited to a value greater than zero | The weight of the item to be packed |
items.productWeight.weightUnit | Required | String Limited to either pound (lb) or kilogram (kg) | The unit of measurement the weight of the item to be packed is specified in |
items.quantity | Required | Integer Limited to a value greater than zero | The number of items to be packed |
packagingSetId | Required | String Limited to a valid ID found within the Shipium platform | A list of strings representing the Shipium generated ID of a packaging set asset configured through the Shipium console |
Example cURL call
curl
curl --request POST
--url https://api.shipium.com/api/v1/packaging/planner
--header 'accept: application/json'
--header $AUTHSTRING
--header 'content-type: application/json'
--data 'INSERT REQUEST BODY FROM BELOW'
Example request body
{
"packagingSetId": "d160dda4-cfcf-48be-9842-86c50d6ceea4",
"items": [
{
"productLinearDimensions": {
"width": 2,
"length": 2,
"height": 2,
"linearUnit": "in"
},
"productId": "item1",
"productWeight": {
"weight": 2,
"weightUnit": "oz"
},
"quantity": 1
},
{
"productLinearDimensions": {
"width": 4,
"length": 4,
"height": 4,
"linearUnit": "in"
},
"productId": "item2",
"productWeight": {
"weight": 1,
"weightUnit": "oz"
},
"quantity": 1
}
]
}
Example standard response
{
"packageCount":1,
"unpackableItems":[
{
"productLinearDimensions":{
"width":100,
"length":200,
"height":100,
"linearUnit":"in"
},
"productId":"bigolproductthatisstillsomehow2oz",
"productWeight":{
"weight":2,
"weightUnit":"oz"
},
"quantity":1,
"productDetails":[
]
}
],
"packages":[
{
"linearDimensions":{
"linearUnit":"in",
"length":5.5,
"height":5,
"width":5
},
"maxContentWeight":{
"weight":100,
"weightUnit":"oz"
},
"packagingWeight":{
"weight":2,
"weightUnit":"oz"
},
"packagingMaterial":"box",
"packagingTypeId":"c26f69e5-a1ce-4b0f-abec-0dded100860c",
"packagingSizeName":"5x5x5",
"packageEstimatedWeight":{
"weight":3,
"weightUnit":"oz"
},
"packageContents":[
{
"productLinearDimensions":{
"width":1,
"length":2,
"height":1,
"linearUnit":"in"
},
"productId":"item2",
"productWeight":{
"weight":2,
"weightUnit":"oz"
},
"quantity":2,
"productDetails":[
]
}
]
}
],
"volumetricPackEfficiency":46.55
}
Example response for unpackable items
{
"packageCount":1,
"unpackableItems":[
{
"productLinearDimensions":{
"width":100,
"length":200,
"height":100,
"linearUnit":"in"
},
"productId":"bigolproductthatisstillsomehow2oz",
"productWeight":{
"weight":2,
"weightUnit":"oz"
},
"quantity":1,
"productDetails":[
]
}
],
"packages":[
{
"linearDimensions":{
"linearUnit":"in",
"length":5.5,
"height":5,
"width":5
},
"maxContentWeight":{
"weight":100,
"weightUnit":"oz"
},
"packagingWeight":{
"weight":2,
"weightUnit":"oz"
},
"packagingMaterial":"box",
"packagingTypeId":"c26f69e5-a1ce-4b0f-abec-0dded100860c",
"packagingSizeName":"5x5x5",
"packageEstimatedWeight":{
"weight":3,
"weightUnit":"oz"
},
"packageContents":[
{
"productLinearDimensions":{
"width":1,
"length":2,
"height":1,
"linearUnit":"in"
},
"productId":"item2",
"productWeight":{
"weight":2,
"weightUnit":"oz"
},
"quantity":2,
"productDetails":[
]
}
]
}
],
"volumetricPackEfficiency":46.55
}
Example response for unpackable items and request to not include product details in response
{
"packageCount":1,
"unpackableItems":[
{
"productId":"bigolproductthatisstillsomehow2oz",
"quantity":1
}
],
"packages":[
{
"linearDimensions":{
"linearUnit":"in",
"length":5.5,
"height":5,
"width":5
},
"maxContentWeight":{
"weight":100,
"weightUnit":"oz"
},
"packagingWeight":{
"weight":2,
"weightUnit":"oz"
},
"packagingMaterial":"box",
"packagingTypeId":"c26f69e5-a1ce-4b0f-abec-0dded100860c",
"packagingSizeName":"5x5x5",
"packageEstimatedWeight":{
"weight":3,
"weightUnit":"oz"
},
"packageContents":[
"productId":"item2",
"quantity":2,
}
]
}
],
"volumetricPackEfficiency":46.55
}
Resources
Your Implementation team member is available to help along the way. However, you might find these resources helpful:
Updated about 2 months ago