v1

latestSwagger 2.02026-07-1411223.4 KB

a pure-JSON endpoint for packing requests.

post/

Request body

allowableOverhangnumber

The amount an item can overhang lower items that it is placed upon. The units are whatever units the box and item dimensions are given in. By convention, inches.

boxTypeSetsBoxTypeSet[]

predefined box types to be used, separated by commas. Will be overridden by boxTypes. Acceptable values are <ul><li>"fedex"--FedEx OneRate</li><li>"usps"--USPS Priority Flat Rate</li><li>"pallet"--full-, half-, and quarter-sized 48"x40" pallets.

cohortMaxinteger

the maximum number of contiguous cohorts for a given item type within a single container. E.g., if you pack 40 chairs in a single container, a cohortMax of 2 could yield one (all 40 chairs in a single block if space is availabe) or two (say, 25 chairs in one corner and 15 in the other) contiguous cohorts.

cohortPackingboolean

if selected, will ensure that all like items will be packed together, in no more than [cohortMax] different groups within a single container.

coordOrderinteger[]

If placementStyle is set to "default", coordOrder sets the placement priority of axes ascendingly. "0,1,2" would search for placement points along the Z(length,"2"), then Y(width,"1"), and finally X(height"0"). Keep in mind that in the default rendering the "up" direction is X and the other axes follow the right-hand rule. This is useful for different packing methods. E.g., Utilizing "2,0,1" would pack a shipping container first in the Y(width) direction, then in the X(height) direction, and finally in the Z(length) direction, replication a floor-to-ceiling, front-to-back loading method.

cornersboolean

only pack items at valid corner points of other items (optimal)

imgSizeinteger

width of rendered SVGs in pixels.

includeImagesboolean

include inline images, default is always on

includeScriptsboolean

include inline javascripts and styles for base template

interlockboolean

alternates layFlat orientation by layer, so as to create an interlocked placement pattern and improve item stability.

keystring

issued API key.

layFlatboolean

aligns all items laying flat. If possible, it may create a "brick-laying" pattern to increase stability.

maxSequenceDistanceinteger

This is the maximum distance allowable between two sequence values of items packed in a common box. E.g., "Distance" for an item sequence composed of aisle/bin combinations of "0401" and "1228" has a sequence distance of |1228 - 401| = 827

ninteger

number of random items to generate and the quantity of each if "random" is set to true. a value of 5 would create 5 different items with a quantity of 5 each, making the total item quantity equal to n²

placementStyle'default' | 'corner' | 'wedge' | 'mound' | 'orb'

How to place items. 'default' will defer to coordOrder, 'corner' minimizes distance to rear, bottom corner, 'wedge' minimizes distance to middle of bottom, back edge, 'mound' minimizes distance to center of carton bottom.

randomboolean

create random items

randomMaxDimensioninteger

maximum item dimension along a single axis for randomly generated items.

randomMaxWeightinteger

maximum item weight for randomly generated items.

seedboolean

if random is selected, seed the random number generator to deterministically generate random items to pack.

sequenceHeatMapboolean

Colorize items solely by their sequence value, light when sequence is high, dark when it is low. Useful for indicating item bin location, weight, or other sequence property that may not be apparent from the default visualization.

sequenceSortboolean

Whether or not the items should be initially sorted by their sequence value instead of their volume. This is not always useful, as the default "biggest-first" volume sort is very effective for items, and constraining by maxSequenceDistance is applied regardless of this field. That said, for doing custom pre-sorts such as weight-based instead of volume based, this value should be set to true.

template'demo.tmpl' | 'shipapp.tmpl' | 'boat.tmpl'

template name for markup generation.

usableSpacenumber

estimate of percentage space in boxes that is usable, i.e., not packing material.

zoneinteger

<b>[experimental]</b> the shipping zone in order to use basic zone-based price optimization.

Response

Successful pack.

builtstring

build timestamp of engine.

lenBoxesinteger

cardinality of all packed boxes

lenItemsinteger

cardinality of all items

lenLeftoversinteger

cardinality of items unabled to be packed

packTimenumber

seconds spent in packing

renderTimenumber

seconds spent in rendering and placement instruction creation of packing solution

scriptsstring

additional javascripts for any image loading.

stylesstring

additional styles for pack images

svgsstring

all box SVG images

titlestring

title of packing result, when applicable.

totalCostinteger

total estimated cost of all packed boxes, when applicable, in cents.

totalTimenumber

seconds spent generating response, total.

versionstring

version of engine

All 1 operations