Pack first: packs for a product
POST /pack-first plans packs for a product, or for several in a mixed pack, as ParametrIQ's
File › New from Product does (Pack first): every way the products can go in a case, standing or
lying down, each with the fitment and the outer the library's rules suggest (or a shrink-wrapped tray), run at the
sizes it needs, costed and fitted to a pallet, best first; and, if asked, the drawing of one of them and files
exported from it. No template is sent: the designs are the library's own.
The request
| Field | Meaning |
|---|---|
product |
The product: shape (Round or Boxed), its sizes in mm (diameter, or length and width; height), its material (Glass, Pet, Can, Carton or Other), how many go in a case (count) and, if known, what one weighs (weight, kg). |
products |
Instead of product, a mixed pack: a list of products as above, each with its own count. They go in the cells grouped, in order, each product taking whole rows (or columns), each cell sized for its product where the fitment allows (mixed packs). |
play |
Added round each product: a cell's inside is the product and this (2 mm if left out). |
clearance |
Between the fitment's outside and the outer's inside (3 mm if left out). |
rankBy |
Cheapest (the default), LeastBoard or BestPalletFit. |
twoLayers |
Whether layers with a divider pad between are offered: two when the count is even, standing; two to four lying down (true if left out). |
orientation |
Upright (the default), Lying (the products lie down, their height along the case's length or across it) or Either (both, ranked together). A material the rules never lay down stays upright. |
style |
Case (the default) or ShrinkTray: a low tray with the products in it and shrink film round the lot. |
trayWallHeight |
A shrink-wrapped tray's wall height, mm (a quarter of the product's height, at least 25, if left out). |
make |
A plan's place in the list (from 0): its drawing comes back too. |
exports |
Files of the drawing to send back (that plan's, or the first's if make is left out): each a format of /formats and, for a format that writes one page, a page (see Exports). |
options |
How the exports are made, as /export's options (margin, spot colours, appearance …). |
The answer
plans, best first: each arrangement (cells along, across and layers, the cell's inside, lying: None,
AlongLength or AlongWidth), its fitment (null: none; its quantity: one on each layer) and the other fitments that suit ("None" among them), its
outer and the others, the divider pad (and its quantity: one between each two layers), each part's design, the
values it was run with, its outside, board, area (m²) and cost (one's); what the outer holds, its inside and outside (mm), the
board's area and cost in all, whether every board has a price in the price list, and the cases on a layer of a
1200 × 800 (EUR) and a 1200 × 1000 (UK) pallet; products, each product's name and count. A mixed pack's cells
sized per product also give cellLengths and cellWidths (each column's and each row's cell inside, mm; null where
every one is the cell's) and byColumns (the products put in column by column). A shrink-wrapped tray
also has trayWall (its walls' height, mm) and film: its area (m², the pack's outside and 10 % for the overlap),
its cost (at the price list's Film: shrink per m², included in the plan's cost) and whether it is priced. With
make (or exports), drawing is that plan's drawing as ParametrIQ drawing text (a page per part, the assembly, a
sheet and the 3D page) and title its title.
A product without its sizes, a make that isn't a plan's place, a format there is none of, or a page the drawing
hasn't, is refused (400).
Exports
Each of exports comes back in exports, in the order asked, with its format, the page it is of, its media type
(contentType), a fileName, the file itself (content, base64) and its warnings:
| Format | What it writes |
|---|---|
pdf |
Every page but the 3D page, a PDF page each (or only page, when it is given). |
glb, usdz, step |
The 3D page: the outer folded round the fitment and the products, as the 3D view makes it. |
Any other (dxf, svg, cf2, dielinepdf …) |
One page: page (Outer, Fitment, Pad, Assembly, Sheet 1), the outer's if left out. |
Example
POST /pack-first
X-API-KEY: your-api-key
Content-Type: application/json
{
"product": { "shape": "Round", "diameter": 65, "height": 250, "material": "Glass", "count": 6 },
"rankBy": "Cheapest",
"make": 0
}
{
"plans": [
{
"arrangement": "3 × 2", "across": 3, "down": 2, "layers": 1, "turned": false, "lying": "None",
"cell": { "length": 67, "width": 67, "height": 252 },
"fitment": { "design": "Bottle shipper partitions", "values": { "L": 67, "W": 67, "D": 250, "CELLSL": 3, "CELLSW": 2 },
"outside": { "length": 207, "width": 137, "height": 250 }, "board": "B flute (3 mm)",
"boardArea": 0.149, "cost": 0.07, "priced": true, "printed": [ "Long partitions: 1 of 207 × 250; …" ],
"quantity": 1 },
"fitments": [ "Bottle shipper partitions", "Bottle platform insert with hole grid", "Case insert grid", "None" ],
"outer": { "design": "FEFCO 0201 Regular slotted container", "values": { "L": 210, "W": 140, "D": 255 }, "…": "…" },
"outers": [ "FEFCO 0201 Regular slotted container", "Shipping case with carry handle", "…" ],
"pad": null,
"contents": { "length": 207, "width": 137, "height": 252 },
"inside": { "length": 210, "width": 140, "height": 255 },
"outside": { "length": 216, "width": 146, "height": 267 },
"boardArea": 0.414, "cost": 0.19, "priced": true,
"pallets": [ { "pallet": "EUR", "length": 1200, "width": 800, "perLayer": 29, "layers": 6, "total": 174 }, "…" ],
"weight": null, "problems": [], "film": null, "trayWall": null,
"products": [ { "name": "", "count": 6 } ]
}
],
"drawing": "//Product// ParametrIQ …",
"title": "6 × Bottle in a FEFCO 0201 Regular slotted container",
"exports": []
}
Example: a mixed pack, shrink-wrapped, with its files
POST /pack-first
X-API-KEY: your-api-key
Content-Type: application/json
{
"products": [
{ "name": "Tomatoes", "shape": "Round", "diameter": 73, "height": 110, "material": "Can", "count": 4 },
{ "name": "Beans", "shape": "Round", "diameter": 66, "height": 115, "material": "Can", "count": 2 }
],
"style": "ShrinkTray",
"trayWallHeight": 30,
"exports": [ { "format": "pdf" }, { "format": "dxf", "page": "Outer" }, { "format": "glb" } ]
}
{
"plans": [
{
"arrangement": "3 × 2", "lying": "None", "cell": { "length": 75, "width": 75, "height": 117 },
"fitment": null, "fitments": [ "None" ],
"outer": { "design": "Tray with glued corners", "values": { "L": 228, "W": 153, "D": 30 }, "…": "…" },
"trayWall": 30,
"film": { "area": 0.218, "cost": 0.02, "priced": true },
"products": [ { "name": "Tomatoes", "count": 4 }, { "name": "Beans", "count": 2 } ],
"…": "…"
}
],
"drawing": "//Product// ParametrIQ …",
"title": "6 × Tomatoes + Beans in a Tray with glued corners",
"exports": [
{ "format": "Pdf", "page": null, "contentType": "application/pdf", "fileName": "pack.pdf", "content": "JVBERi0xLjc…", "warnings": [] },
{ "format": "Dxf", "page": "Outer", "contentType": "image/vnd.dxf", "fileName": "pack-outer.dxf", "content": "…", "warnings": [] },
{ "format": "Glb", "page": "3D", "contentType": "model/gltf-binary", "fileName": "pack-3d.glb", "content": "Z2xURg…", "warnings": [] }
]
}
See also: API, Export, Formats, Pack first.