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.

Dashboard
API
  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, and 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: This is the default box used when created a label in Dashboard.

  6. Click Add box.

View packaging options

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

Delete packaging options

Dashboard
API
  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?