DOCS

Cartonization api

/

Manage packaging options

Manage your packaging options and cartonize your orders.

Efficiently managing your packaging options is key to streamlining the cartonization process. You have the flexibility to create, update, and delete packaging options through Dashboard or via API. Additionally, you can also cartonize items using the API, ensuring that your shipping process is precisely tailored to your specific needs.

Create packaging options

Adding your packaging options enables Zonos to accurately calculate the most suitable packaging.

To add a box:

  1. Add your shipping boxes by going to Dashboard -> Settings -> Cartonization.
  2. Click Add box in the top right corner.
  3. Add your box's Dimensional unit, Length, Width, Height, Weight unit, Max weight, and Package weight.
  4. Optional— Name your box. If you don't, we'll name it based on its characteristics.
  5. Optional—Mark your box as your default box by checking the Make default box size box.

    Note: Default boxes are used as a fallback when no box size is applied to the order.

  6. Click Add box.

To add boxes in bulk via CSV:

  1. Go to Dashboard -> Settings -> Cartonization.
  2. Click Add box in the upper right-hand corner.
  3. Download the cartonization CSV template and enter your box names, maximum weight, package weight, and dimensions in the designated fields. Once completed, save the file in CSV format.
  4. Upload your new CSV file to cartonization by dragging and dropping or by clicking browse to locate and select the file.
  5. Click Continue and view your newly added boxes.

CSV fields descriptions

ColumnDescription
Box nameThe name of your box for referencing.
Weight unitThe box's weight unit. Valid values are gram, kilogram, pound, and ounce. If a unit is not provided, the value will default to pound.
Max weightThe box's maximum weight capacity.
Package weightThe weight of the packaging materials.
Dimensional unitThe product’s dimensional unit. Valid values are inch, foot, yard, millimeter, centimeter, and meter. If a unit is not provided, the value will default to inch.
LengthThe length of the box.
WidthThe width of the box.
HeightThe height of the box.

View packaging options

  1. Go to Dashboard -> Settings -> Cartonization.
  2. View your packaging options.

Delete packaging options

  1. Go to Dashboard -> Settings -> Cartonization.
  2. Click the checkbox next to the box(es) you'd like to delete.
  3. Click Delete and then Yes, delete.

Cartonizing items

After setting up your packaging options, you can use the cartonize mutation. This process requires the shipTo, shipFrom, and item details to accurately assign items to the appropriate boxes for shipping. This step is vital for supplying precise packaging details to the carrier, which in turn improves the accuracy of shipping cost calculations.

Mutation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
mutation {
  partyCreateWorkflow(
    input: [
      { type: ORIGIN, location: { countryCode: US } }
      { type: DESTINATION, location: { countryCode: CA } }
    ]
  ) {
    id
  }
  itemCreateWorkflow(
    input: [
      {
        quantity: 4
        amount: 50
        productId: "123"
        description: "test 1223"
        currencyCode: USD
        measurements: [
          { type: WEIGHT, value: 10, unitOfMeasure: POUND }
          { type: LENGTH, value: 10, unitOfMeasure: INCH }
          { type: WIDTH, value: 5, unitOfMeasure: INCH }
          { type: HEIGHT, value: 2, unitOfMeasure: INCH }
        ]
      }
    ]
  ) {
    id
  }
  cartonizeWorkflow {
    packagingOption {
      name
    }
    id
    width
    length
    height
    dimensionalUnit
    weight
    weightUnit
    items {
      quantity
      item {
        productId
        id
      }
    }
  }
}

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
  "data": {
    "partyCreateWorkflow": [
      {
        "id": "party_ee2f80f2-0775-449e-a5f8-e8c5310f9c67"
      },
      {
        "id": "party_0ea8c605-3a4b-4e19-8f1a-316cb8ddbe78"
      }
    ],
    "itemCreateWorkflow": [
      {
        "id": "item_d0cb6416-17cc-404f-9755-a93ce4356c38"
      }
    ],
    "cartonizeWorkflow": [
      {
        "packagingOption": {
          "name": "Box 1"
        },
        "id": "carton_d0615c15-5158-4908-b818-9e5eeb7092ed",
        "width": 5.0,
        "length": 5.0,
        "height": 10.0,
        "dimensionalUnit": "INCH",
        "weight": 20,
        "weightUnit": "POUND",
        "items": [
          {
            "quantity": 1,
            "item": {
              "productId": "123",
              "id": "item_d0cb6416-17cc-404f-9755-a93ce4356c38"
            }
          },
          {
            "quantity": 1,
            "item": {
              "productId": "123",
              "id": "item_d0cb6416-17cc-404f-9755-a93ce4356c38"
            }
          }
        ]
      },
      {
        "packagingOption": {
          "name": "Box 1"
        },
        "id": "carton_817de960-8e20-43c4-84c8-f8eedfea1f93",
        "width": 5.0,
        "length": 5.0,
        "height": 10.0,
        "dimensionalUnit": "INCH",
        "weight": 20,
        "weightUnit": "POUND",
        "items": [
          {
            "quantity": 1,
            "item": {
              "productId": "123",
              "id": "item_d0cb6416-17cc-404f-9755-a93ce4356c38"
            }
          },
          {
            "quantity": 1,
            "item": {
              "productId": "123",
              "id": "item_d0cb6416-17cc-404f-9755-a93ce4356c38"
            }
          }
        ]
      }
    ]
  }
}

Was this page helpful?