Reference
Check a sheet cut list
POST
/v1/sheet/validate
Check without solving: free.
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 |
Whether the cut list is valid, and its problems. | Validation |
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 300 free calls this minute (60 on Free), 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/validate \
-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:
{
"valid": false,
"errors": [
{
"field": "…",
"message": "…",
"upgrade": "free"
}
]
}