← API reference Which stock a part may come from, and how your own identifiers come back.
materialWhen any part or stock carries material, the response adds materials (a per-material rollup — material, sheetCount/rodCount, yieldPct, placed, total, totalPrice) and unmatchedMaterials (demand whose material has no matching stock). On wood the material rides per cross-section section instead. Both keys are absent for a material-free job, which stays byte-identical.
POST /v1/optimize/2d
{
"parts": [
{ "name": "Door", "w": 600, "h": 400, "qty": 4, "material": "MDF 18" },
{ "name": "Shelf", "w": 800, "h": 300, "qty": 6, "material": "Oak 18" },
{ "name": "Back panel", "w": 1000, "h": 500, "qty": 2, "material": "Ply 6" }
],
"stock": [
{ "w": 2440, "h": 1220, "qty": 10, "price": 42, "material": "MDF 18" },
{ "w": 2440, "h": 1220, "qty": 10, "price": 68, "material": "Oak 18", "priority": true }
],
"options": { "kerf": 3 },
"engine": "heuristic"
}▶ Run this example Uses a public demo key — rate-limited, small jobs only, never billed.
{
"materials": [
{
"material": "MDF 18",
"sheetCount": 1,
"yieldPct": 32.25,
"placed": 4,
"total": 4,
"totalPrice": 42
},
{
"material": "Oak 18",
"sheetCount": 1,
"yieldPct": 48.37,
"placed": 6,
"total": 6,
"totalPrice": 68
}
],
"unmatchedMaterials": [
{
"material": "Ply 6",
"parts": [{ "name": "Back panel", "w": 1000, "h": 500, "qty": 2 }]
}
]
}materials[] — per-material rollup (2d) One material's totals across the sheets cut from it.
Field Type Description material string The tag exactly as you sent it. Free text, matched exactly. sheetCount integer Sheets cut from this material. yieldPct number Used area ÷ total area of THIS material's sheets, %. placed integer Parts of this material placed. total integer Parts of this material requested (Σ qty). totalPrice number Sum of the prices of the sheets used for this material.
materials[] — per-material rollup (1d) One material's totals across the rods cut from it.
Field Type Description material string The tag exactly as you sent it. Free text, matched exactly. rodCount integer Bars cut from this material. yieldPct number Placed length ÷ total bar length of THIS material's rods, %. placed integer Parts of this material placed. total integer Parts of this material requested (Σ qty). totalPrice number Sum of the prices of the bars used for this material.
materials[] — per-material rollup (nest) One material's totals across the sheets cut from it.
Field Type Description material string The tag exactly as you sent it. Free text, matched exactly. sheetCount integer Sheets cut from this material. density number This material's own fill: placed polygon area / area of its sheets — a polygon fill, not comparable to the rectangular modes' yieldPct. placed integer Part copies of this material placed. total integer Part copies of this material requested (Σ qty). totalPrice number Sum of the prices of the sheets used for this material.
unmatchedMaterials[] — demand with no matching stock (2d) Demand of a material for which the job supplied ZERO stock of that material.
Field Type Description material string The tag that has no stock of its own anywhere in the request. parts Unplaced2D[] The demand rows in that material, in the 2D unplaced shape: name, w, h, qty.
unmatchedMaterials[] — demand with no matching stock (1d) Field Type Description material string The tag that has no stock of its own anywhere in the request. parts Unplaced1D[] The demand rows in that material, in the 1D unplaced shape: name, length, qty.
unmatchedMaterials[] — demand with no matching stock (nest) Field Type Description material string The tag that has no stock of its own anywhere in the request. parts UnplacedNest[] The demand rows in that material, in the nest unplaced shape: name, qty.
← Previous Parts from SVG and DXF Next → Grain matching (matched sets)