Reference
Solve a sheet cut list
POST
/v1/sheet/solves
Solve at once in one of the workspace's solve slots.
Headers and parameters
| Field | Type | Meaning |
|---|---|---|
Idempotency-Key (header)
|
string | Send the same key and body to get the first answer again, for a day; nothing new starts. |
Request body
A SheetRequest as JSON. Required fields are marked; the rest may be left out.
| Field | Type | Meaning |
|---|---|---|
v
|
integer | The form's version: 1. |
unit
required
|
string |
The unit lengths are typed in.
One of
mm
,
cm
,
m
,
in
|
kerf
|
string | The saw's kerf; blank for none. |
mode
|
string |
A panel saw's edge-to-edge cuts, or a CNC router's free placement. Anything but "free" reads as "guillotine".
One of
guillotine
,
free
|
stages
|
string |
A panel saw's cut stages; anything else reads as 3.
One of
2
,
3
|
minimum_leftover
|
string | The smallest leftover worth keeping. |
target
|
string |
What the plan aims for. "cost" needs the Bench plan; asked for on another plan, the request is refused with a 403.
One of
sheets
,
waste
,
leftover
,
cost
|
strict
|
boolean | Fail when a part is left out. |
sheets
required
|
array of SheetStock | The sheets to cut from. At most 100 rows. |
parts
required
|
array of SheetPart | The parts to cut. At most 1000 rows, and 20,000 pieces in all. |
band_types
|
array of SheetBandType | The edge bands parts may take. At most 20. |
part_sizes
|
string |
Whether part sizes are finished sizes, edge band included, so the band's thickness comes off each banded edge to give the size cut; or the sizes cut from the sheet, with the band added on after.
One of
finished
,
cut
|
band_waste
|
string | The percent of edge band to order on top of what the edges measure; blank for none. |
Responses
| Status | When | Body |
|---|---|---|
200 |
The plan. | SheetReport |
400 |
An Idempotency-Key that isn't 1 to 255 characters. | Errors |
401 |
No live API key. | Errors |
403 |
The plan doesn't include this; `upgrade` names the plan that does. | Errors |
409 |
A request with this Idempotency-Key is still running. | Errors |
413 |
A body over 4 MB. | Errors |
422 |
The request breaks a rule, each problem naming its field, or its Idempotency-Key was used for another request, or it holds more rows or longer text than the API takes. | Errors |
429 |
More than 30 solves and job starts this minute (6 on Free), every one of the workspace's solve slots is busy, or more than 600 calls from this address. | Errors |
500 |
Something went wrong on our side; try again. | Errors |
Example
A sample request: the body's required fields, and one row of each kind when the body requires none.
curl -X POST https://api.nestsolver.com/v1/sheet/solves \
-H "Authorization: Bearer $NESTSOLVER_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"unit": "mm",
"sheets": [
{
"width": "2440",
"height": "1220",
"qty": "10",
"price": "38.50",
"material_key": "",
"grain": "width"
}
],
"parts": [
{
"width": "600",
"height": "400",
"quantity": "4",
"label": "Side panel",
"material_key": "",
"grain_along": "",
"band_long": 0,
"band_short": 0
}
]
}'
A 200
answer, required fields only; lists show one item:
{
"unit": "mm",
"metrics": {
"sheets": 1,
"parts_placed": 1,
"parts_requested": 1,
"sheet_area": 0,
"part_area": 0,
"reusable_area": 0,
"reusable_leftovers": 1,
"waste_area": 0,
"utilization_percent": 0,
"waste_percent": 0
},
"sheets": [
{
"sheet_row": 1,
"width": 0,
"height": 0,
"material": "",
"parts": [
{
"part_row": 1,
"label": "Side panel",
"x": 0,
"y": 0,
"width": 600,
"height": 400,
"rotated": false,
"finished_width": 0,
"finished_height": 0,
"grain": "width",
"band": null,
"band_long": 1,
"band_short": 1
}
],
"cuts": [
{
"stage": 1,
"axis": "vertical",
"at": 0,
"from": 0,
"to": 0
}
],
"leftovers": [
{
"x": 0,
"y": 0,
"width": 600,
"height": 400,
"kind": "reusable"
}
],
"grain": "width"
}
],
"unplaced": [
{
"part_row": 1,
"label": "Side panel",
"count": 1
}
],
"cost": {
"total_cents": 1,
"waste_cents": 1,
"drop_value_cents": 1
},
"unpriced_sheet_rows": [
1
],
"banding": [
{
"band": "…",
"thickness": 0,
"edges": 1,
"length": 1250,
"length_with_waste": 0
}
],
"explanation": "…"
}