Skip to main content

PackNet Online Documentation

JSON Properties

All properties are optional, unless otherwise specified.

All units of measurement must conform to the unit of measurement specified in the PackNet customer settings. No mixed units of measurement are allowed. When the customer is configured to use millimeters, then all units must be in millimeters.

The identifiers property must contain the primary ID chosen for the database. In addition, users may supply as many other product identifiers as desired. For example, if a configuration specifies that the SKU is the primary identifier, then the identifiers property must have a SKU property.

Note

This property will not work unless all characters are lower case.

Supported identifier properties:

  • EAN

  • GTIN

  • GTIN_8

  • GTIN_12

  • GTIN_13

  • GTIN_14

  • ISBN

  • ISBN_10

  • ISBN_13

  • ItemNumber

  • MPN

  • SKU

  • UPC

Below is an example product JSON using UPC and SKU identifiers:

{
  "identifiers": {
    "upc": "12345678",
    "sku": "98765432"
  },
  "name": "Bread Basket",
  "dimensions": {
    "length": 14,
    "width": 8,
    "height": 8
  }
}

This property contains the length, width, and height of the product. Dimensions do not have to be from largest to smallest, and they can take any order. The format for each dimension is a number. All units of measurement must be consistent with what is defined in customer settings.

{
  "identifiers": {
    "upc": "12345678"
  },
  "name": "Bread Basket",
  "dimensions": {
    "length": 14,
    "width": 8,
    "height": 8
  }
}

This property is used to give a product a description. The format will be a string. Multiple lines of text can be specified by using /n. All other JSON escape characters are supported.

Below is an example of a description property:

{
  "identifiers": {
    "upc": "12345678"
  },
  "name": "Bread Basket",
  "description": "Keep all your bread in this kitchen basket",
  "dimensions": {
    "length": 14,
    "width": 8,
    "height": 8
  }
}

This property is used to specify the product name. This is a string.

{
  "identifiers": {
    "upc": "12345678"
  },
  "name": "Bread Basket",
  "dimensions": {
    "length": 14,
    "width": 8,
    "height": 8
  }
}

This property specifies how the product must be oriented when shipping. This is important for more delicate products being shipped. This property is a boolean property. When the OrientationLocked value is set to "true," the property will be locked on Dimension3, which is typically the height or vertical dimension, to keep the product in a defined position within the carton result.

Attributes_Orientation.png

Below is an example of using the orientation property:

{
  "identifiers": {
    "upc": "12345678"
  },
  "name": "Bread Basket",
  "orientationLocked": "true",
  "dimensions": {
    "length": 14,
    "width": 8,
    "height": 8
  }
}

This is used to specify the quantity of items in a package. This property is useful when multiple products are packaged and sold together. The format for this property is a number. The product dimensions must indicate the total length, width, and height of the overall package, and not the individual items inside.

Below is an example of using the quantity property. The quantity in this case is "1" indicating that there is only one bread basket needing to be packaged.

{
  "identifiers": {
    "upc": "12345678"
  },
  "name": "Bread Basket",
  "quantity": 1,
  "dimensions": {
    "length": 14,
    "width": 8,
    "height": 8
  }
}

This property is used to specify a product's weight. The format is a number (floating-point or integer). Units of measurement are not specified. The measurement units are determined by the customer's settings in PackNet. The code below is an example of using the weight property.

{
  "identifiers": {
    "upc": "12345678"
  },
  "name": "Bread Basket",
  "weight": 2.4,
  "dimensions": {
    "length": 14,
    "width": 8,
    "height": 8
  }
}

These properties indicate whether or not the product has a cavity or empty space that can be utilized when packing with other items. The canContain property is a Boolean and must be true or false. When true, a voidFill property must be specified with length, width, and height. All canContain spaces must be calculated as cuboidal.

For example, imagine a trash can, a large mixing bowl, or an L-shaped bookend. Each of these items has space that they don't use, and another smaller product can be placed inside. Below is a code example of using this property.

{
  "identifiers": {
    "upc": "12345678"
  },
  "name": "Bread Basket",
  "dimensions": {
    "length": 14,
    "width": 8,
    "height": 8
  },
  "canContain": true,
  "voidFill": {
    "length": 13,
    "width": 7,
    "height": 7
  }
}

These properties are used to indicate whether multiple quantities of the same item can be stacked together (items like plastic cups or books). The canNest property is a Boolean. If true, a nesting property must be specified with the following sub-properties:

  • NestGrowthDimension1: The length-increment by which the product grows.

  • NestGrowthDimension2: The width-increment by which the product grows.

  • NestGrowthDimension3: The height-increment by which the product grows.

Below is a code example using this property. It's recommended to only use the NestGrowthDimension on a single dimension. The most common dimension to grow is Dimension3, which is the vertical axis.

{
  "identifiers": {
    "upc": "12345678"
  },
  "name": "Bread Basket",
  "dimensions": {
    "length": 14,
    "width": 8,
    "height": 8
  },
  "canContain": true,
  "voidFill": {
    "length": 13,
    "width": 7,
    "height": 7
  }
}

This property causes DIM to add additional padding to products. The dimensions of the product plus the padding will show in the paddedDimensions field.

The following examples display how the variables look in the response depending on the padding requirements.

PackNet Cube uses the paddedDimensions field as it calculates the dimensions of the product with the padding.

Item Does Not Require Padding
{
  "requiresPadding": false,
  "useDefaultPadding": false,
  "padding": 10,
  "dimensions": {
    "length": 10,
    "width": 10,
    "height": 10
  },
  "paddedDimensions": {
    "length": 10,
    "width": 10,
    "height": 10
  }
}
Requires Padding - Does Not Use Default Padding
{
  "requiresPadding": true,
  "useDefaultPadding": false,
  "padding": 10,
  "dimensions": {
    "length": 10,
    "width": 10,
    "height": 10
  },
  "paddedDimensions": {
    "length": 20,
    "width": 20,
    "height": 20
  }
}
Requires Padding - Uses Default Padding
{
  "requiresPadding": true,
  "useDefaultPadding": true,
  "padding": 20,
  "dimensions": {
    "length": 10,
    "width": 10,
    "height": 10
  },
  "paddedDimensions": {
    "length": 30,
    "width": 30,
    "height": 30
  }
}

This property determines when products are allowed to be layered with other products or not. The layer restrictions are handled at the product level and uses the isSingleLayer property. When isSingleLayer is enabled for a product, the algorithm will avoid placement of additional products on top or underneath the specified product.

For layering to be allowed, the property should be: isSingleLayer: true

Below is an example of a single layering property request:

{
  "orderId": "TEST_ORDER",
  "items": [
    {
      "sku": "ProductA",
      "dimension1": 10,
      "dimension2": 20,
      "dimension3": 30,
      "weight": 5,
      "quantity": 6,
      "canNest": false,
      "isSingleLayer": true,
      "OrientationLocked": false,
    }
  ],
  "containerOptions": {
    "minimumDimension1": 1,
    "maximumDimension1": 20,
    "incrementDimension1By": 1,
    "minimumDimension2": 2,
    "maximumDimension2": 40,
    "incrementDimension2By": 1,
    "minimumDimension3": 3,
    "maximumDimension3": 60,
    "incrementDimension3By": 1,
    "maximumWeight": 100
  },
  "SelectionOptions": {
    "OrderBy": "distance",
    "CutoffTime": 1200000,
    "Shrinkwrap": true,
    "MaxCartons": 0
  },
  "limit": 1,
  "maxCartons": 10
}

Below is an example of a single layering property response:

{
    "containerId": 9636,
    "timeoutReached": false,
    "orderId": "TEST_ORDER",
    "packagingResult": {
      "isCompletePack": true,
      "packedItems": [
        {
          "id": 0,
          "isPacked": true,
          "dimension1": 10,
          "dimension2": 20,
          "dimension3": 30,
          "coordinateX": 0,
          "coordinateY": 0,
          "coordinateZ": 0,
          "quantity": 1,
          "packedDimensionX": 20,
          "packedDimensionY": 10,
          "packedDimensionZ": 30,
          "volume": 6000,
          "canNest": false,
          "orientationLocked": false,
          "isSingleLayer": true,
          "nestGrowthDimension1": 0,
          "nestGrowthDimension2": 0,
          "nestGrowthDimension3": 0,
          "nestMaxDimension1": 0,
          "nestMaxDimension2": 0,
          "nestMaxDimension3": 0,
          "canContain": false,
          "containDimension1": 0,
          "containDimension2": 0,
          "containDimension3": 0,
          "sku": "ProductA",
          "voidContents": null,
          "nestedQuantity": 0,
          "weight": 5
        },
        {
          "id": 0,
          "isPacked": true,
          "dimension1": 10,
          "dimension2": 20,
          "dimension3": 30,
          "coordinateX": 0,
          "coordinateY": 0,
          "coordinateZ": 30,
          "quantity": 1,
          "packedDimensionX": 30,
          "packedDimensionY": 20,
          "packedDimensionZ": 10,
          "volume": 6000,
          "canNest": false,
          "orientationLocked": false,
          "isSingleLayer": true,
          "nestGrowthDimension1": 0,
          "nestGrowthDimension2": 0,
          "nestGrowthDimension3": 0,
          "nestMaxDimension1": 0,
          "nestMaxDimension2": 0,
          "nestMaxDimension3": 0,
          "canContain": false,
          "containDimension1": 0,
          "containDimension2": 0,
          "containDimension3": 0,
          "sku": "ProductA",
          "voidContents": null,
          "nestedQuantity": 0,
          "weight": 5
        },
        {
          "id": 0,
          "isPacked": true,
          "dimension1": 10,
          "dimension2": 20,
          "dimension3": 30,
          "coordinateX": 20,
          "coordinateY": 0,
          "coordinateZ": 0,
          "quantity": 1,
          "packedDimensionX": 10,
          "packedDimensionY": 20,
          "packedDimensionZ": 30,
          "volume": 6000,
          "canNest": false,
          "orientationLocked": false,
          "isSingleLayer": true,
          "nestGrowthDimension1": 0,
          "nestGrowthDimension2": 0,
          "nestGrowthDimension3": 0,
          "nestMaxDimension1": 0,
          "nestMaxDimension2": 0,
          "nestMaxDimension3": 0,
          "canContain": false,
          "containDimension1": 0,
          "containDimension2": 0,
          "containDimension3": 0,
          "sku": "ProductA",
          "voidContents": null,
          "nestedQuantity": 0,
          "weight": 5
        },
        {
          "id": 0,
          "isPacked": true,
          "dimension1": 10,
          "dimension2": 20,
          "dimension3": 30,
          "coordinateX": 30,
          "coordinateY": 0,
          "coordinateZ": 0,
          "quantity": 1,
          "packedDimensionX": 20,
          "packedDimensionY": 10,
          "packedDimensionZ": 30,
          "volume": 6000,
          "canNest": false,
          "orientationLocked": false,
          "isSingleLayer": true,
          "nestGrowthDimension1": 0,
          "nestGrowthDimension2": 0,
          "nestGrowthDimension3": 0,
          "nestMaxDimension1": 0,
          "nestMaxDimension2": 0,
          "nestMaxDimension3": 0,
          "canContain": false,
          "containDimension1": 0,
          "containDimension2": 0,
          "containDimension3": 0,
          "sku": "ProductA",
          "voidContents": null,
          "nestedQuantity": 0,
          "weight": 5
        },
        {
          "id": 0,
          "isPacked": true,
          "dimension1": 10,
          "dimension2": 20,
          "dimension3": 30,
          "coordinateX": 30,
          "coordinateY": 0,
          "coordinateZ": 30,
          "quantity": 1,
          "packedDimensionX": 30,
          "packedDimensionY": 20,
          "packedDimensionZ": 10,
          "volume": 6000,
          "canNest": false,
          "orientationLocked": false,
          "isSingleLayer": true,
          "nestGrowthDimension1": 0,
          "nestGrowthDimension2": 0,
          "nestGrowthDimension3": 0,
          "nestMaxDimension1": 0,
          "nestMaxDimension2": 0,
          "nestMaxDimension3": 0,
          "canContain": false,
          "containDimension1": 0,
          "containDimension2": 0,
          "containDimension3": 0,
          "sku": "ProductA",
          "voidContents": null,
          "nestedQuantity": 0,
          "weight": 5
        },
        {
          "id": 0,
          "isPacked": true,
          "dimension1": 10,
          "dimension2": 20,
          "dimension3": 30,
          "coordinateX": 50,
          "coordinateY": 0,
          "coordinateZ": 0,
          "quantity": 1,
          "packedDimensionX": 10,
          "packedDimensionY": 20,
          "packedDimensionZ": 30,
          "volume": 6000,
          "canNest": false,
          "orientationLocked": false,
          "isSingleLayer": true,
          "nestGrowthDimension1": 0,
          "nestGrowthDimension2": 0,
          "nestGrowthDimension3": 0,
          "nestMaxDimension1": 0,
          "nestMaxDimension2": 0,
          "nestMaxDimension3": 0,
          "canContain": false,
          "containDimension1": 0,
          "containDimension2": 0,
          "containDimension3": 0,
          "sku": "ProductA",
          "voidContents": null,
          "nestedQuantity": 0,
          "weight": 5
        }
      ],
      "packTimeInMilliseconds": 0,
      "percentContainerVolumePacked": 75,
      "percentItemVolumePacked": 100,
      "unpackedItems": [],
      "packedItemsCount": 6,
      "packedItemsWeight": 30
    },
    "container": {
      "id": 9636,
      "dimension1": 60,
      "dimension2": 20,
      "dimension3": 40,
      "volume": 48000,
      "ratio": 3,
      "surfaceArea": 8800,
      "distance": 74.8331477354788,
      "maximumWeight": 100
    },
    "solutionTimeMs": 956,
    "messages": [],
    "customFields": null
  }
]