Skip to content
Export Packing Layout

Export Packing Layout

The packing_layout field is available on the wholesale_order and wholesale_orders queries as well as the Shipment ASN webhook. It returns the full packing structure of a wholesale order once it has been packed. If the order is not yet packed, the field returns null.

The layout is returned as a JSON object (GenericScalar) — not a typed GraphQL object — so you can traverse it freely without a predefined schema.

Querying the packing layout

Single order

query {
  wholesale_order(id: "WO-123") {
    data {
      id
      status
      packing_layout
    }
  }
}

Multiple orders

query {
  wholesale_orders(customer_account_id: "ACC-456") {
    data(first: 10) {
      edges {
        node {
          id
          status
          packing_layout
        }
      }
    }
  }
}

Response structure

The packing_layout object contains:

FieldTypeDescription
created_atstringTimestamp when the packing configuration was created
updated_atstringTimestamp when the packing configuration was last updated
containersarrayTop-level containers (the root of the packing hierarchy)

Container types

Pallet

A regular pallet containing packages, case packs, and/or loose line items. Only appears in freight orders.

FieldTypeDescription
typestringAlways "Pallet"
detailsobjectDimensions, weight, barcode, and container number
line_itemsarrayLoose items packed directly on the pallet
containersarrayNested Boxes and/or CasePacks

Package (Box)

A box or carton. In the response, nested packages appear with type: "Box" to distinguish them from top-level packages which use type: "Package".

FieldTypeDescription
typestring"Package" for top-level, "Box" for nested
detailsobjectDimensions, weight, barcode, and container number
shipping_detailsobject or nullCarrier, method, SCAC, and tracking number (courier orders only, top-level only)
line_itemsarrayItems packed inside this box
containersarrayNested Boxes and/or CasePacks

CasePack

A sealed product case. Can appear at the top level (courier orders) or nested inside a pallet or package. CasePacks are always leaf nodes — they have no children.

FieldTypeDescription
typestring"CasePack"
detailsobjectDimensions, weight, barcode, and container number
shipping_detailsobject or nullOnly present on top-level casepacks in courier orders
order_line_item_idintThe order line item this case pack fulfills
partner_line_item_idstringPartner-provided line item identifier
case_skustringSKU of the product case definition
quantityintNumber of cases
child_skustringSKU of the direct content of this case (may be another case or eaches)
child_sku_quantityintUnits of child_sku contained per case
each_skustringSKU of the ultimate each-level product
each_quantityintTotal eaches contained per case
lotobject or nullLot details if lot tracking is enabled

Note: For simple cases (case contains eaches directly), child_sku equals each_sku and child_sku_quantity equals each_quantity. For nested UOMs (e.g., a master case containing inner cases of eaches), these will differ.

UOM Pallet

A pallet that represents a single unit-of-measure product case. Only appears in freight orders. Uses the same fields as CasePack but with type: "UOM Pallet". UOM Pallets do not contain child containers or line items — all product information is derived from the linked product case.


Shipping details

The shipping_details object is present on top-level containers in courier orders when a shipping label has been created. If the order has been packed but not yet shipped, shipping_details will be null.

FieldTypeDescription
carrierstringCarrier name
shipping_methodstringShipping method
scacstring or nullStandard Carrier Alpha Code
tracking_numberstring or nullTracking number

Both top-level Packages and top-level CasePacks can have shipping details in courier orders.


Freight example

A freight order with a regular pallet (containing a box with line items and a casepack) and a UOM pallet:

{
  "created_at": "2026-01-15T10:30:00",
  "updated_at": "2026-01-15T10:30:00",
  "containers": [
    {
      "type": "Pallet",
      "details": {
        "height": 48.0,
        "length": 40.0,
        "width": 48.0,
        "weight_in_oz": 1600.0,
        "barcode": "PLT001",
        "sscc_barcode": "PLT001",
        "shipping_box_id": "pallet-type-1",
        "container_number": 1
      },
      "line_items": [],
      "containers": [
        {
          "type": "CasePack",
          "details": {
            "height": 12.0,
            "length": 10.0,
            "width": 8.0,
            "weight_in_oz": 160.0,
            "barcode": "CASE001",
            "sscc_barcode": "CASE001",
            "shipping_box_id": null,
            "container_number": 1
          },
          "order_line_item_id": 1001,
          "partner_line_item_id": "PO-LINE-001",
          "case_sku": "MASTER-CASE-A",
          "quantity": 2,
          "child_sku": "INNER-CASE-A",
          "child_sku_quantity": 4,
          "each_sku": "SKU-WIDGET",
          "each_quantity": 24,
          "lot": null
        },
        {
          "type": "Box",
          "details": {
            "height": 16.0,
            "length": 12.0,
            "width": 10.0,
            "weight_in_oz": 320.0,
            "barcode": "PKG001",
            "sscc_barcode": "PKG001",
            "shipping_box_id": null,
            "container_number": 1
          },
          "line_items": [
            {
              "order_line_item_id": 1002,
              "partner_line_item_id": "PO-LINE-002",
              "sku": "SKU-GADGET",
              "name": "Gadget",
              "quantity": 10
            }
          ],
          "containers": []
        }
      ]
    },
    {
      "type": "UOM Pallet",
      "details": {
        "height": 60.0,
        "length": 48.0,
        "width": 40.0,
        "weight_in_oz": 2400.0,
        "barcode": "UOMPLT001",
        "sscc_barcode": "UOMPLT001",
        "shipping_box_id": null,
        "container_number": 2
      },
      "order_line_item_id": 1003,
      "partner_line_item_id": "PO-LINE-003",
      "case_sku": "PALLET-SKU-B",
      "quantity": 1,
      "child_sku": "SKU-EACH-B",
      "child_sku_quantity": 100,
      "each_sku": "SKU-EACH-B",
      "each_quantity": 100,
      "lot": {
        "id": 42,
        "name": "LOT-2026-001",
        "expiration_date": "2027-06-15"
      }
    }
  ]
}

Key points:

  • Top-level containers are Pallets and UOM Pallets. Packages and CasePacks are nested inside.
  • UOM Pallets have no containers or line_items — all product info comes from the product case fields.
  • CasePacks inside a pallet do not have shipping_details.

Courier example

A courier order with a top-level casepack (shipped on its own) and a top-level package:

{
  "created_at": "2026-01-20T14:00:00",
  "updated_at": "2026-01-20T14:00:00",
  "containers": [
    {
      "type": "CasePack",
      "details": {
        "height": 12.0,
        "length": 10.0,
        "width": 8.0,
        "weight_in_oz": 160.0,
        "barcode": "CASE001",
        "sscc_barcode": "CASE001",
        "shipping_box_id": null,
        "container_number": 1
      },
      "shipping_details": {
        "carrier": "UPS",
        "shipping_method": "Ground",
        "scac": "UPSN",
        "tracking_number": "1Z999AA10123456784"
      },
      "order_line_item_id": 2001,
      "partner_line_item_id": "PO-LINE-010",
      "case_sku": "CASE-SKU-X",
      "quantity": 1,
      "child_sku": "SKU-EACH-X",
      "child_sku_quantity": 12,
      "each_sku": "SKU-EACH-X",
      "each_quantity": 12,
      "lot": null
    },
    {
      "type": "Package",
      "details": {
        "height": 16.0,
        "length": 12.0,
        "width": 10.0,
        "weight_in_oz": 320.0,
        "barcode": "PKG001",
        "sscc_barcode": "PKG001",
        "shipping_box_id": null,
        "container_number": 1
      },
      "shipping_details": {
        "carrier": "UPS",
        "shipping_method": "Ground",
        "scac": "UPSN",
        "tracking_number": "1Z999AA10123456785"
      },
      "line_items": [
        {
          "order_line_item_id": 2002,
          "partner_line_item_id": "PO-LINE-011",
          "sku": "SKU-LOOSE-ITEM",
          "name": "Loose Item",
          "quantity": 5
        }
      ],
      "containers": []
    }
  ]
}

Key points:

  • Top-level containers are CasePacks and Packages. Pallets are not used in courier orders.
  • CasePacks appear before Packages in the response.
  • Both top-level CasePacks and Packages can have shipping_details when a label exists.
  • shipping_details is null if the order is packed but not yet shipped.