Custom Package Types

Using packages is a great way to streamline the shipping process.

Warning

Custom Prefix

When creating a custom package, you must prefix the package_code with custom_ or the request will be rejected with a HTTP 400, Bad Request status code.

Define a Package Type

Example Request
curl -iX POST https://api.shipengine.com/v1/packages \
-H 'Content-Type: application/json' \
-H 'API-Key: __YOUR_API_KEY_HERE__' \
-d '
{
  "package_code": "custom_laptop_box",
  "name": "laptop_box",
  "dimensions": {
    "unit": "inch",
    "length": 15,
    "width": 20,
    "height": 5
  },
  "description": "Packaging for laptops."
}'
  • curl
Example Response
{
  "package_id": "se-100896",
  "package_code": "custom_laptop_box",
  "name": "laptop_box",
  "dimensions": {
    "unit": "inch",
    "length": 15.0,
    "width": 20.0,
    "height": 5.0
  },
  "description": "Packaging for laptops."
}

List Your Package Types

GET /v1/packages

curl -iX GET https://api.shipengine.com/v1/packages \
-H 'API-Key: __YOUR_API_KEY_HERE__'
{
  "packages": [
    {
      "package_id": "se-102873",
      "package_code": "custom_laptop_box",
      "name": "Custom Laptop Box",
      "dimensions": {
        "unit": "inch",
        "length": 15.00,
        "width": 20.00,
        "height": 5.00
      },
      "description": ""
    }
  ]
}

Delete a Package Type

DELETE /v1/packages/:package_id

Deleting a package will not disassociate it from any shipments. It will merely stop being available for use with future shipments, and it will stop showing up when listing packages.

curl -iX DELETE https://api.shipengine.com/v1/packages \
-H 'API-Key: __YOUR_API_KEY_HERE__'
  • curl

If successful, responds with HTTP Status 204, No Content.