API reference
Calculations
The Calculations API runs a should-cost calculation on a part and returns the priced result — quote a stored revision, upload-and-quote a file in one call…
The Calculations API runs a should-cost calculation on a part and returns the priced result — quote a stored revision, upload-and-quote a file in one call, then list, fetch, or bulk-manage runs.
Auto-generated from the public OpenAPI spec — this page never drifts from the running API. Base URL
https://api.arcnm.io. Authenticate with theX-API-Keyheader (see Authentication).
List Calculations
GET /api/v1/calculations
List calculations for the tenant.
Paged newest-first by default with a slim projection — no analytics
blob, to keep the list response cheap. Walk the whole collection by
following next_cursor (or the Link header) until has_more is
false; count is this page's size, never the total.
To reconcile a bulk run against your own records, page with
order=asc and a created_after bound: rows come oldest-first, so
calculations submitted while you are still walking land after your
position instead of shifting rows under it.
Optional part_id narrows the result to a single part. Optional
ids turns this into the bulk polling surface: poll one request per
sweep, not one per calculation.
Paginated. Pass
cursor(from the previous response) to fetch the next page;limitcaps the page size.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
status_filter |
query | string[] | no | Filter by lifecycle status (e.g. queued, running, succeeded, failed, cancelled). Repeatable; several values are OR-ed. |
part_id |
query | string | no | Identifier of the part. |
batch_id |
query | string | no | Narrow to one batch's calculations — e.g. every cell of a multi-environment comparison grid. Pair with the batch comparison endpoint, which returns the pivoted matrix. |
material_grade_id |
query | string[] | no | Only runs priced against one of these material grades. Repeatable; several values are OR-ed, so passing every value is the same as passing none. |
sort |
query | string | no | Ordering key. Rows with no value yet (an in-flight run has no unit cost) sort last in both directions. Ignored when ids is set. offer_price orders on the price each calculation headlines and the comparison ranks on (the item's offer_price; an assembly priced only in part states none and sorts last); unit_cost on the unit cost (direct cost plus the flat overheads, below the cost-sheet rungs). created_at, offer_price, lot_size and annual_volume support cursor; unit_cost and finished_at are null until a run settles, so a cursor over them cannot reach every row and is rejected — those two return the first page only. |
include_facets |
query | boolean | no | Also return facets: status and material values with counts, each computed over everything the OTHER active filters allow. |
ids |
query | string | no | Comma-separated calculation IDs (max 500). THE polling surface for bulk clients: one weight-1 sweep returns the status of every listed calculation, instead of N weight-1 detail requests that exhaust the per-org rate budget (self-DoS). When set, limit and ordering are ignored and every matching row is returned. |
parent_calculation_id |
query | string | no | Only the component calculations of this assembly. By default the list contains top-level calculations only — assembly components are reachable through their parent. |
include_components |
query | boolean | no | With part_id: also list the calculations this part received as a component of an assembly (each at the lot the assembly implied). Ignored without part_id. |
upload_session_id |
query | string | no | Only the calculations created through one upload link, by the upload_session_id the link was issued with — the parts a person uploaded on its page, and no one else's. |
cursor |
query | string | no | Opaque position token from the previous page's next_cursor (or the Link / X-Next-Cursor response header). Omit it for the first page. Keep every other query parameter identical for the whole walk — a cursor replayed against different filters is rejected. |
limit |
query | integer | no | Maximum rows to return in one page. |
order |
query | asc | desc |
no | Sort direction over the collection's ordering key. Use asc to reconcile a batch: rows come oldest-first, so work created while you page lands after your position instead of shifting rows under it. |
created_after |
query | string | no | Only rows created at or after this instant (RFC 3339, e.g. 2026-07-20T09:00:00Z). Inclusive. |
created_before |
query | string | no | Only rows created strictly before this instant (RFC 3339). Exclusive, so an after/before pair tiles a range without overlap. |
include_total |
query | boolean | no | Also return the total number of rows matching the query, across all pages. Off by default because it costs an extra scan; has_more is the cheap way to know whether to keep paging. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
count |
integer | Number of calculations on THIS page. |
facets |
object | Present only when include_facets is set. Maps each filter name to its selectable values with counts. |
has_more |
boolean | Whether more rows match beyond this page. A full page with has_more: false is the end of the collection. |
items |
CalculationListItem[] | The calculations on this page, newest first. |
next_cursor |
string | Position token for the next page — pass it back as cursor. Null on the last page. |
total |
integer | Total rows matching the query across all pages. Null unless include_total=true was requested. |
Example response
{
"count": 0,
"facets": {},
"has_more": false,
"items": [
{
"assembly_role": "string",
"assembly_state": "string",
"attempt_count": 0,
"batch_id": "string",
"costing_environment_id": "string",
"created_at": "string",
"currency": "EUR",
"derived_from_calculation_id": "string",
"engine": "arcanum",
"environment_changed_since_run": {
"latest_at": "string"
},
"error": "string",
"finished_at": "string",
"full_stock_charge": "auto",
"id": "string",
"inputs_changed_since_run": {
"corrections": 0,
"latest_at": "string",
"removed_roles": [],
"roles": []
},
"lot_size": 50,
"material_grade_id": "string",
"material_ref": "1.4301",
"max_attempts": 0,
"n_assumed": 0,
"name": "string",
"nest_item_id": "string",
"nest_revision": 0,
"nestable": false,
"offer_price": 0,
"part_id": "string",
"part_revision_id": "string",
"price_completeness": "string",
"revision_code": "string",
"started_at": "string",
"status": "draft",
"stock_format_id": "string",
"stock_format_mm": {
"length_mm": 0,
"width_mm": 0
},
"unit_cost": 12.84
}
],
"next_cursor": "string",
"total": 0
}
Create a calculation (queued)
POST /api/v1/calculations
Create a calculation for a part revision in a costing environment. Does NOT enqueue — call POST /calculations/{id}/run to price it.
One endpoint covers every part. An attached 2D drawing is read automatically — there is nothing to configure.
Creates exactly one calculation: costing_environment_ids with more than one entry is rejected here — fan a comparison out via POST /calculations/batch, /quote or /upload-and-quote.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
annual_volume |
integer | no | Expected yearly quantity (1 to 1,000,000,000). It drives the lot-size recommendation and the holding cost, not the quoted unit price, which spreads setup over lot_size. On a re-run (derived_from_calculation_id), omitting it keeps the annual volume of the calculation re-run. |
costing_environment_id |
string | no | UUID of the costing environment (machine rates, region) to price against. Omit to use your organization's default environment (GET /whoami names it). |
costing_environment_ids |
string[] | no | Price this part in several environments at once, in comparison order. Each environment becomes one calculation and counts as one against the plan quota. Mutually exclusive with costing_environment_id; duplicates are collapsed preserving first occurrence. The response then carries batch_id and environment_runs. |
currency |
string | no | ISO 4217 currency code for the quote; defaults to the costing environment's currency when omitted. Another currency needs an exchange rate from the environment's currency: a code that is not ISO 4217 is refused with 422 currency_unknown, one the environment has no exchange rate into with 422 currency_not_configured, before any calculation is created. |
dataset_link_id |
string | no | UUID of a specific dataset link to use; omit to use the revision's active primary CAD. |
derived_from_calculation_id |
string | no | The calculation this one is re-run from — pass it when pricing again after a drawing was attached or from a result's own page, so the new calculation records what it supersedes. Must name a calculation of your organization; the new calculation is its own row and counts as one. |
engine |
string | no | Pricing engine selector; retained for back-compat and always normalized to the sole engine. |
full_stock_charge |
auto | full | full_no_credit | share |
no | How the started sheet or bar of the lot is charged: auto applies the environment's full_stock_threshold (the lot pays the whole piece once its parts fill that share of it, the unused cells credited as scrap where scrap is credited); full charges the whole piece at any lot; full_no_credit charges it whole with no scrap credit on the unused cells; share charges only the lot's share at any lot. A lot of whole pieces, or a piece holding one part, is charged the same under every word. On a re-run (derived_from_calculation_id), omitting it keeps the word of the calculation re-run. |
language |
string | no | BCP 47 language for the calculation's captured context (e.g. 'de', 'en'). |
lot_size |
integer | no | Number of identical parts produced per batch (1 to 1,000,000,000). On a re-run (derived_from_calculation_id), omitting it keeps the lot size of the calculation re-run. |
material_grade_id |
string | no | UUID of a resolved material grade; takes precedence over material_ref when both are supplied. On a re-run (derived_from_calculation_id), omitting both it and material_ref keeps the material the calculation re-run was asked for (one read from its drawing is read again). |
material_is_provided |
boolean | no | True when the customer supplies the raw material (beigestellt) — the material cost line is set to zero; machining, setup and overheads are billed normally. On a re-run (derived_from_calculation_id), omitting it keeps the value of the calculation re-run. |
material_ref |
string | no | Free-form material reference (URN, Werkstoffnummer, AISI/SAE code, trade name, or your SKU); resolved to a material grade. Unresolvable values are rejected with 422 material_unresolved plus ranked candidates. Omit to price the material read from the part's drawing (or the environment default). On a re-run (derived_from_calculation_id), omitting both it and material_grade_id keeps the material the calculation re-run was asked for (one read from its drawing is read again); send null to price the drawing's material instead. |
name |
string | no | Optional human-readable label; defaults to a timestamped name when omitted. |
nest_item_id |
string | no | Price this calculation's material on its part's line of a job nest — the id of a line (items[].id) of a job nest that has solved it. The material is then the line's share of the sheets the job nest cut it from together with other parts, less its share of what their skeleton and reusable rests earn back; everything else is priced as usual. The line must be of your organization, of this costing environment and of this part revision, and its job nest must have solved it; otherwise the request is rejected with 422 nest_item_unresolved, details.reason saying why. It cannot be combined with stock_format_id or with customer-supplied material. An upload creates a new part revision, so the upload forms reject every line. A line of the sheets an assembly shares among its own components prices that assembly only: naming one is rejected as not_found, and a re-run of such a component prices it on its own sheet. Omit it to price the part on its own sheet. On a re-run (derived_from_calculation_id), omitting it keeps the line of the calculation re-run; send null to price the part on its own sheet. |
part_revision_id |
string | yes | UUID of the part revision to price. |
provided_stock_kind |
none | near_net_profile | near_net_casting | sawn_blank |
no | Shape of the provided stock. 'near_net_profile' (extruded profile) additionally scopes the process plan to the features the profile does not already provide. On a re-run (derived_from_calculation_id), omitting it keeps the shape of the calculation re-run. |
region |
string | no | Pricing region override; defaults to the costing environment's region when omitted. |
stock_format_id |
string | no | Price this calculation on one stock format — the id of a format from GET /stock-formats. An id names the format, not only the version it came from: when the format has been changed since, the version current on the day the calculation is created is used. An id your organization cannot price with today (unknown, retired or hidden) is rejected with 422 stock_format_unresolved. When the part cannot be cut from that format — too small, not bought in the part's thickness or material, or one the machine cannot load — or is not cut from sheet at all (milled, turned or bought finished), the calculation is priced as if none had been chosen, and analytics.pipeline_notes says why (stock_format_pin_unavailable). Omit it to price on the format that uses the least material per part. On a re-run (derived_from_calculation_id), omitting it keeps the format of the calculation re-run; send null to price without one. |
stock_format_mm |
StockFormatMm | no | Price this calculation on a sheet of this size — length and width in mm — instead of a stock format from GET /stock-formats: the part is laid out on that one sheet, cut to size by your supplier, and the purchased stock says format_source custom. It cannot be combined with stock_format_id or nest_item_id. When the part does not fit the sheet, or is not cut from sheet stock at all, the calculation is priced as if none had been stated and analytics.pipeline_notes says why. On a re-run (derived_from_calculation_id), omitting both it and stock_format_id keeps the size or format of the calculation re-run; send null to price without one. |
stock_statement |
StockStatementRawPartPrice | no | The price per piece of the raw part the drawing names (a bought article, weldment, casting or near-net blank), in the costing environment's currency: {raw_part_unit_price}. The material line is then that amount and the raw part is neither stated as an assumption nor left out; a part whose drawing names no raw part is priced as without it. On a re-run (derived_from_calculation_id), omitting it keeps the price the calculation re-run stated; send null to state none. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"part_revision_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"part_revision_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"part_revision_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
201 |
Successful Response |
422 |
Validation Error — or a refused reference: material_unresolved (the material names no grade in the catalogue), stock_format_unresolved (stock_format_id names no stock format your organization prices with today) or nest_item_unresolved (nest_item_id names no job-nest line that can price this calculation; details.reason says why). POST /calculations and /quote also refuse currency_unknown (currency is not an ISO 4217 code) and currency_not_configured (the environment has no exchange rate into currency). |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 201
| Field | Type | Description |
|---|---|---|
batch_id |
string | Groups the runs of a multi-environment quote; compare them via GET /calculations/batches/{batch_id}/comparison. Null for a single-environment quote. |
costing_environment_id |
string | UUID of the costing environment this calculation is priced against — the one you supplied, or your organization's default when you omitted it. Always echoed so a caller that omitted the field can tell which rates the quote used. |
coverage |
CalculationCoverage | Populated only when status='blocked': the calc was created but NOT enqueued because billing holds it (reason). Explains how many parts can still run and what lifts the block. null whenever the calc was enqueued. |
environment_runs |
EnvironmentRunStatus[] | All runs of a multi-environment quote, one per requested environment in comparison order. The top-level fields describe the first created run; poll each run (or the batch comparison) for results. Null for a single-environment quote. |
error |
string | Why the calculation failed, when this response already carries a terminal failed status — a run refused at submit time, before any worker. Null in every other case, including a normal enqueue: a run that fails LATER reports through the calculation itself, not through the response that started it. |
eta_basis |
string | How eta_seconds was derived, so the number is auditable: org_rate — divided by YOUR organization's own measured completions per second over the recent window; platform_default — your organization has too little recent history, so the estimate comes from your plan's parallelism and the platform's measured service time. Null when no ETA was computed. |
eta_seconds |
number | Estimated wait before this calculation reaches a result, derived from its queue position divided by a measured completion rate (advisory); null when not enqueued. See eta_basis for which rate was used. |
id |
string | UUID of the calculation. |
queue_position |
integer | 1-based position among YOUR organization's own queued and running calculations at enqueue time (backpressure hint); null when not enqueued. With tenant fair scheduling active your parts run in parallel with other customers, so another tenant's backlog does not push you back. |
status |
string | Current lifecycle state: 'draft' — created by POST /calculations but not yet submitted; it has no worker and no job and is priced only when you call POST /run — then queued, running, succeeded, failed, cancelled, timed_out, or 'blocked' — created but NOT started because billing holds it (see coverage). A blocked calc has no worker and no job. It starts by itself once a top-up is credited, a payment block ends or a paused balance is released; POST /run resumes it too. A component of an assembly, and a calculation held by its own max_overage_cents, do not start by themselves. |
Example response
{
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"environment_runs": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string",
"status": "string"
}
],
"error": "string",
"eta_basis": "string",
"eta_seconds": 0,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"queue_position": 0,
"status": "string"
}
Delete Calculation
DELETE /api/v1/calculations/{calculation_id}
Hard-delete a calculation row.
A non-terminal row is first cancelled (which releases the wallet hold) so the worker can no longer transition it; the row itself is then removed. Use Cancel if you want the audit trail to persist.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request
curl -X DELETE https://api.arcnm.io/api/v1/calculations/{calculation_id} \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.delete(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}", {
method: "DELETE",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
message |
string | Human-readable confirmation that the calculation was deleted. |
Example response
{
"message": "string"
}
Get Calculation
GET /api/v1/calculations/{calculation_id}
Read one calculation in full: its status, the part, revision and costing
environment it prices, its inputs such as lot size and material, and its costed
result. Over MCP the bulk of the analytics object (the lot-size curve,
the cost sheet, the time breakdown, the cost drivers, an assembly's BOM
rows) is left out unless include_analytics=true is passed;
analytics_omitted names it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
include_analytics |
query | boolean | no | Whether to include the analytics object (the cost breakdown and audit detail, often over 100 kB in full). Omitted: the whole object for the app and the REST API; for an MCP agent, the object without its bulk — the lot-size curve, the cost sheet (GET /calculations/{calculation_id}/cost-sheet), the time breakdown, the cost drivers and an assembly's BOM rows (GET /calculations/{calculation_id}/bom), named in analytics_omitted. Pass true for the whole object anywhere, false to leave it out. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/{calculation_id} \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
analytics |
PublicCalculationAnalytics | Cost breakdown and value-engineering detail for a priced calculation; null until the calculation succeeds. |
analytics_omitted |
string[] | The parts of analytics this answer left out, as dotted paths (lot_size_curve, cost_sheet, time_breakdown, cost_drivers, assembly.bom): an MCP agent's read without include_analytics leaves out the bulk that has a tool of its own. Null when nothing was left out. |
annual_volume |
integer | Expected yearly quantity; drives the lot-size recommendation and the holding cost. The quoted unit price spreads setup over lot_size. |
assembly_context |
object | For a component: its key in the bill of materials (component_key), its position, quantity per assembly, effective lot, cost share, a link back to the assembly, and parent_pricing (true while the assembly's run is under way — a component change is refused until it settles). Null otherwise. |
assembly_role |
string | 'assembly' on a decomposed multi-part calculation, 'component' on one of its priced parts, null on an ordinary single part. |
assembly_state |
string | Assembly roll-up progress state; null on a single part. |
attempt_count |
integer | Real execution attempts consumed (retry budget usage), as on the list row. |
confidence |
object | Quote-trust signal: {state: green |
costing_environment_id |
string | UUID of the costing environment used for pricing. |
coverage |
CalculationCoverage | Populated only when status='blocked': why the calc is parked and what lifts the block. null for every other state. Surfaced as a typed field (not just inside analytics) so API/MCP clients see it without the analytics allow-list stripping it. |
created_at |
string | ISO 8601 timestamp when the calculation was created. |
currency |
string | ISO 4217 currency code for the cost figures. |
dataset_link_id |
string | UUID of the dataset link (source geometry / drawing set) this calculation used. Echoed so a recalculate reuses the same dataset instead of the environment default. |
derived_from_calculation_id |
string | UUID of the calculation this one was re-run from (priced again after a drawing was attached, or from its results page); null on a first run. The re-run is its own calculation and this names what it supersedes. |
drawing_read |
PublicDrawingRead | How the part's drawing was read for this price: read (and how), unreadable (and why), left out, or none sent. Null before the calculation has run, and on an assembly — each component states its own. |
engine |
string | Pricing engine used for this calculation. |
environment_changed_since_run |
EnvironmentChangedSinceRun | Null when this result was priced on its costing environment as it stands. Otherwise the environment was edited after this run read it (latest_at); the edit may or may not move the price — a new calculation prices with the current setup, this result does not. |
error |
string | Failure message; null unless the run failed. |
finished_at |
string | ISO 8601 timestamp when the run finished; null before it completes. |
full_stock_charge |
string | The lot rule's override this calculation was priced under — full_stock_charge as requested, or kept from the calculation it re-runs: auto (the environment's threshold), full, full_no_credit or share. What the rule did at the ordered lot is material_detail.lot_rule on the cost sheet. |
id |
string | UUID of the calculation. |
inputs_changed_since_run |
InputsChangedSinceRun | Null when this result reflects every input on its part revision. Otherwise the roles (drawing_2d, mesh, rfq_text) whose active file was attached after the run read its inputs, and the number of corrections applied to the part since — the next run reads them, this result does not. |
language |
string | BCP 47 language this calculation's context was captured in. Echoed so a recalculate keeps it. |
lot_size |
integer | Number of identical parts produced per batch. |
made_part_units |
integer | For an assembly: what one more part made in it draws as it stands (a catalogue part made again) — 1 when each part is metered, 0 when the assembly drew one calculation for the whole. Null otherwise. |
material_grade_id |
string | UUID of the linked material grade; null when no grade is set. |
material_is_provided |
boolean | True when the customer supplies the raw material (beigestellt) and the material cost line is zero. Echoed so a recalculate keeps it instead of billing the material. |
material_ref |
string | Material reference (URN) of the linked grade; null when no grade is set. |
max_attempts |
integer | Retry budget for this row; retries 409 once exhausted. As on the list row. |
n_assumed |
integer | How many stated assumptions the price rests on: work priced on a stand-in rather than on this environment, each an entry of analytics.assumed_work (the shape of analytics.unpriced_work plus basis and stand_in); on an assembly, its components priced on assumptions. A complete price with n_assumed > 0 is complete on those assumptions. |
name |
string | Human-readable label for the calculation. |
needs_human_review |
boolean | True when the analysis flagged this calculation for human review (low confidence, prompt-injection suspicion, or conflicting sources); surfaced at the top level so API consumers can gate on it. |
nest_item_id |
string | The job-nest line this calculation's material was priced on — nest_item_id as requested, or kept from the calculation it re-runs; null when the part was priced on its own sheet. An assembly component priced on the sheets its assembly shares states it with the Nesting add-on only. |
nest_revision |
integer | The revision of that line's sheets this calculation reads: the one current when it was created, or its parent's on a re-run. A later revision of the job nest never changes it. |
nestable |
boolean | Whether this calculation can join a job nest: a finished sheet-metal price, with its layout stored, on material the shop buys. False otherwise. |
offer_price |
number | The headline price per part: the offer price, or unit_cost where the run states none; null until priced and on an assembly priced only in part. The same figure the list row returns as offer_price. |
outcome |
success | failure | cancelled | blocked |
How it ended: success, failure, cancelled, or blocked (a calculation held on billing: it starts by itself once the block lifts, or when you resume it). Null while it has not ended. |
parent_calculation_id |
string | For a component: the assembly calculation it belongs to. |
part_id |
string | UUID of the part this calculation belongs to. |
part_number |
string | The part's number, as the part states it. |
part_revision_id |
string | UUID of the part revision that was priced. |
price_completeness |
string | 'partial' when the price leaves out work the drawing asks for — then unit_cost is a lower bound and analytics.process_plan.unpriced lists the work with its remedies; 'complete' when the price covers everything; null on a calculation from before the contract and on one without a price. |
provided_stock_kind |
none | near_net_profile | near_net_casting | sawn_blank |
Shape of the customer-supplied stock; 'none' when the material is bought. Echoed so a recalculate keeps it. |
recalc_units |
integer | At most how many calculations of the plan a new calculation from this one draws: 1 for a part; for an assembly one per distinct part it makes, and 0 when nothing in it is calculated. Each is billed when it succeeds; one that fails draws none. Null when it cannot be said. |
region |
string | Region key used to price this calc; null when the environment's default region was used. Echoed so a recalculate preserves it instead of falling back to the environment default. |
review_reasons |
string[] | Plain-language reasons the calculation was flagged for review; empty when not flagged. |
revision_code |
string | The priced revision's code (e.g. 'B'). |
setup_cost |
number | One-time setup cost of the lot in the quote's currency: the cost sheet's setup line times the lot size, on the same basis as unit_cost, below the cost-sheet rungs; null until pricing completes. |
started_at |
string | ISO 8601 timestamp when the run started; null before it begins. |
status |
draft | queued | running | polling | succeeded | failed | cancelled | timed_out | blocked |
Current lifecycle state: queued, running, succeeded, failed, cancelled, timed_out, or 'blocked' (created but not started — billing holds it; see coverage). |
stock_format_id |
string | The stock format this calculation was asked to be priced on — stock_format_id as requested, or kept from the calculation it re-runs — as the version current when it was created; null when none was asked for. Whether that format priced the part is in analytics.pipeline_notes: stock_format_pin_unavailable when it did not. |
stock_format_mm |
StockFormatMm | The sheet size this calculation was asked to be priced on — stock_format_mm as requested, or kept from the calculation it re-runs; null when none was stated. |
stock_statement |
StockStatementRawPartPrice | The raw part's price per piece this calculation was priced on, as the request stated it ({raw_part_unit_price}, the costing environment's currency); null when none was stated. A re-run keeps it unless the request states another or null. |
surface_treatments |
string[] | Surface treatments stated when this calculation was created (only POST /calculations/batch accepts them); empty when none were. Not part of its price. |
terminal |
boolean | True once this has ended: reading it again changes nothing more. outcome says how it ended. |
total_cost |
number | unit_cost for the full lot (unit_cost x lot_size) in the quote's currency, on the same basis as unit_cost; null until pricing completes. The lot at the offer price is analytics.offer_price x lot_size. |
total_time_s |
number | Total production time for the lot in seconds: one-time setup plus lot size × per-part time; null until pricing completes. |
unit_cost |
number | Unit cost per part in the quote's currency: direct cost plus the variable and fixed overhead per part. Where the environment states no Material-/Fertigungsgemeinkosten the variable overhead is the flat one the environment states (none by default); once it states them those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. Null until pricing completes. The headline price is analytics.offer_price — equal to unit_cost where the environment states no surcharges, the figure the comparison ranks on and the list returns as offer_price and sorts on with sort=offer_price. |
unit_time_s |
number | Production time per part in seconds, including per-part shares of programming and inspection but excluding the one-time lot setup; null until pricing completes. |
Example response
{
"analytics": {
"assembly": null,
"assumptions": null,
"cost_decomposition": null,
"cost_drivers": null,
"cost_sheet": null,
"drawing_pairing": null,
"extraction": null,
"lot_size_curve": null,
"material_resolution": null,
"offer_price": null,
"optimization": null,
"part_requirements": null,
"pipeline_notes": null,
"process_plan": null,
"review": null,
"secondary_route": null,
"selection": null,
"selection_failure": null,
"stage_timings": null,
"time_breakdown": null,
"unit_cost_interval": null
},
"analytics_omitted": [
"string"
],
"annual_volume": 500,
"assembly_context": {},
"assembly_role": "string",
"assembly_state": "string",
"attempt_count": 0,
"confidence": {},
"costing_environment_id": "string",
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"created_at": "string",
"currency": "EUR",
"dataset_link_id": "string",
"derived_from_calculation_id": "string",
"drawing_read": {
"method": "text_layer",
"reason_code": "file_unopenable",
"status": "read"
},
"engine": "arcanum",
"environment_changed_since_run": {
"latest_at": "string"
},
"error": "string",
"finished_at": "string",
"full_stock_charge": "auto",
"id": "string",
"inputs_changed_since_run": {
"corrections": 0,
"latest_at": "string",
"removed_roles": [
"string"
],
"roles": [
"string"
]
},
"language": "string",
"lot_size": 50,
"made_part_units": 0,
"material_grade_id": "string",
"material_is_provided": false,
"material_ref": "1.4301",
"max_attempts": 0,
"n_assumed": 0,
"name": "string",
"needs_human_review": true,
"nest_item_id": "string",
"nest_revision": 0,
"nestable": false,
"offer_price": 0,
"outcome": "success",
"parent_calculation_id": "string",
"part_id": "string",
"part_number": "BRACKET-001",
"part_revision_id": "string",
"price_completeness": "string",
"provided_stock_kind": "none",
"recalc_units": 0,
"region": "EU",
"review_reasons": [
"string"
],
"revision_code": "string",
"setup_cost": 52.5,
"started_at": "string",
"status": "draft",
"stock_format_id": "string",
"stock_format_mm": {
"length_mm": 0,
"width_mm": 0
},
"stock_statement": {
"raw_part_unit_price": 0
},
"surface_treatments": [
"string"
],
"terminal": false,
"total_cost": 642,
"total_time_s": 184,
"unit_cost": 12.84,
"unit_time_s": 184
}
Price an assembly under what-if surcharges and terms, without billing it
POST /api/v1/calculations/{calculation_id}/assembly-preview
Answers 'what would this assembly sell for if …' for the factors that act above its manufacturing cost: overheads on manufacturing cost, packaging, freight, duty, the mark-up and the sales terms. They are struck again on the assembly's priced manufacturing cost exactly as pricing strikes them. Factors that act inside its components (rates, times, material, lot size) are refused by name: preview a component's own calculation for those. Nothing is kept or billed.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
adjustments |
object | no | Factors to move, by name, each to the value given. The names are the ones a cost-sheet line lists in factors and the environment's factor endpoint publishes: a factor stated per process carries its process (time.setup_efficiency.milling), a shop-wide one does not. Every value is checked against that factor's own band before anything is priced. Leave empty to price the same factors at a different lot size. |
lot_size |
integer | no | Quantity to price at. Omit to keep the quantity the calculation was priced for. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/assembly-preview \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"adjustments": {},
"lot_size": 50
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/assembly-preview",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"adjustments": {},
"lot_size": 50
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/assembly-preview", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"adjustments": {},
"lot_size": 50
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
cost_decomposition |
object | The assembly's cost decomposition with the surcharges, mark-up and sales terms struck again under the adjustments, in the costing environment's currency before calibration — the same shape as the calculation's own analytics.cost_decomposition. |
currency |
string | The calculation's currency (ISO 4217). |
delta |
object | Change per surcharge, mark-up and sales-term line against the priced assembly, in the calculation's currency: new minus current. offer_price is the change in the offer price. |
offer_price |
number | Offer price per assembly under the adjustments, in the calculation's currency. |
offer_price_before |
number | Offer price per assembly as priced, in the calculation's currency. |
total_delta |
number | Change in the manufacturing cost per assembly: always 0, as on a part's preview it is the change in unit_cost. |
unit_cost |
number | Manufacturing cost per assembly. The levers an assembly answers all act above it, so it does not move. |
Example response
{
"cost_decomposition": {},
"currency": "EUR",
"delta": {},
"offer_price": 0,
"offer_price_before": 0,
"total_delta": 0,
"unit_cost": 12.84
}
Assembly route — the work on the joined body, in order
GET /api/v1/calculations/{calculation_id}/assembly-route
The precedence-ordered assembly operations with cost + evidence.
Steps that exist but are unpriced are included with their
disclosures — never omitted. Empty (pending: true) until the
aggregation has run. 404 for a non-assembly calculation.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/{calculation_id}/assembly-route \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/assembly-route",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/assembly-route", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
calculation_id |
string | |
currency |
string | |
pending |
boolean | True until the assembly roll-up has produced the route. |
steps |
AssemblyRouteStepOut[] |
Example response
{
"calculation_id": "string",
"currency": "EUR",
"pending": true,
"steps": [
{
"cost_per_unit": 0,
"din_codes": [
"string"
],
"din_group": "string",
"disclosures": [
"string"
],
"evidence": {},
"included_in": "string",
"key": "string",
"lot_minimum_eur": 0,
"price_state": "priced",
"priced": true,
"rank": 0,
"time_s_per_unit": 0
}
]
}
Assembly bill of materials with live per-component status
GET /api/v1/calculations/{calculation_id}/bom
The assembly's component table, the polling surface while parts price in.
Rows come from the dispatch-time BOM (position, name, quantity,
effective lot) overlaid with each component calculation's LIVE
status and cost — so the table renders progressively as children
complete, without one request per row. nodes lays the rows onto
the product structure the CAD file states: each sub-assembly with how
many times it is placed, its own work and its subtotal. 404 for a
calculation that is not an assembly.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/{calculation_id}/bom \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/bom",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/bom", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
assembly_state |
string | Assembly progress state. |
calculation_id |
string | |
capped |
boolean | True when pricing was capped to the largest parts. |
completeness |
AssemblyCompletenessOut | Whether the roll-up is a price or a lower bound, and why. The one place a caller — human or agent — can tell an intended product limit apart from a gap without parsing prose. |
component_ceiling |
integer | The most component calculations one assembly runs: its made components up to this many are priced, the largest first. |
currency |
string | |
drawings |
AssemblyDrawingsOut | The drawing pack: how many components carry a drawing and which files still need a decision. |
lot_size |
integer | |
n_occurrences |
integer | Placed parts in the assembly. |
n_sub_assemblies |
integer | Sub-assembly nodes the CAD file states below the root (0 on a flat file). |
n_unique |
integer | Unique parts. |
nodes |
AssemblyBomNodeOut[] | The product structure the CAD file states, root first, then each sub-assembly in the order the file states it, every node before the nodes inside it: per node its instances, its own work and its subtotal. The rows' placements point into it. A flat file has the root alone. |
outcome |
success | failure | cancelled | blocked |
How it ended: success, failure, cancelled, or blocked (a calculation held on billing: it starts by itself once the block lifts, or when you resume it). Null while it has not ended. |
progress |
AssemblyBomProgress | |
rollup |
AssemblyRollupOut | |
rows |
AssemblyBomRowOut[] | |
shared_sheets |
AssemblySharedSheetsOut | The sheet components nested together on shared sheets and what each cost alone and together; null before nesting has started. |
status |
string | The assembly calculation's own status. |
terminal |
boolean | True once the assembly and every component calculation have ended: reading it again changes nothing more. A component priced again makes it false until that component ends. |
Example response
{
"assembly_state": "string",
"calculation_id": "string",
"capped": true,
"completeness": {
"drawing_read_failed": false,
"exclusions": [
{
"key": "string",
"reason": "string"
}
],
"missing": {
"components": 0,
"components_in_part": 0,
"own_work": 0,
"treatments": 0
},
"n_assumed": 0,
"n_excluded": 0,
"n_partial": 0,
"n_pending": 0,
"n_priced": 0,
"n_steps_not_priced": 0,
"n_unique": 0,
"n_unpriced": 0,
"nothing_priced": false,
"partial": [
{
"label": "string",
"position": 0
}
],
"price_completeness": "string",
"priced_complete": true,
"steps_left_out": [
{
"key": "string",
"kind": "own_work",
"process_class": "string",
"reasons": [],
"state": "not_priced"
}
],
"total_is_lower_bound": true,
"unpriced": [
{
"by_design": true,
"evidence": {},
"label": "string",
"position": 0,
"reason_code": "string",
"remedy": "string"
}
]
},
"component_ceiling": 0,
"currency": "EUR",
"drawings": {
"assembly": {
"added_at": "string",
"basis": "string",
"candidates": [
{}
],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [
{}
],
"title": "string"
},
"n_files": 0,
"n_matched": 0,
"n_unassigned": 0,
"n_with_drawing": 0,
"unassigned": [
{
"added_at": "string",
"basis": "string",
"candidates": [],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [],
"title": "string"
}
]
},
"lot_size": 50,
"n_occurrences": 0,
"n_sub_assemblies": 0,
"n_unique": 0,
"nodes": [
{
"components_cost_per_instance": 0,
"instances": 0,
"instances_per_parent": 0,
"name": "string",
"node_id": "string",
"own_cost_per_instance": 0,
"own_time_s_per_instance": 0,
"parent_id": "string",
"path": [
"string"
],
"priced_complete": true,
"subtotal": 0,
"subtotal_per_instance": 0
}
],
"outcome": "success",
"progress": {
"done": 0,
"total": 0
},
"rollup": {
"components_cost": 0,
"components_time_s": 184,
"joining_cost": 0,
"n": 0,
"ops_cost": 0,
"overhead": 0,
"overhead_fixed": 0,
"own_time_s": 184,
"priced_complete": true,
"rounding": 0,
"setup_cost_amortised": 0,
"setup_cost_per_lot": 0,
"total_cost": 642,
"total_time_s": 184,
"unit_cost": 12.84,
"unit_time_s": 184
},
"rows": [
{
"assembly_path": [
"string"
],
"child_calculation_id": "string",
"child_part_id": "string",
"component_key": "string",
"cost_share": 0,
"designation": "string",
"drawing": {
"attached_at": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"read_by_run": true,
"shared_with_assembly": false,
"title": "string"
},
"drawing_number": "string",
"effective_lot": 0,
"extended_cost": 0,
"label": "string",
"lot_curve": [
{}
],
"machine_klass": "string",
"machine_name": "string",
"material_display_code": "string",
"material_grade_id": "string",
"n_assumed": 0,
"needs_human_review": true,
"not_in_parts_list": true,
"occurrence_indices": [
0
],
"override": {},
"part_number": "BRACKET-001",
"part_number_source": "drawing_part_number",
"placements": [
{}
],
"position": 0,
"price_completeness": "string",
"price_notes": [
"string"
],
"price_source": "string",
"procurement": {
"basis": "string",
"category": "string",
"decision": "make",
"kind": "string",
"match": "string",
"nominal_m": 0,
"standard": "string"
},
"product_id": "string",
"purchased_assembly": {
"n_parts": 0
},
"qty_per": 0,
"rest": "calculate",
"scrap_pct": 0,
"sourcing": "make",
"standard_part": {
"nominal_m": 0,
"role": "primary",
"standard": "string"
},
"status": "string",
"treatments_covered": [
{}
],
"unit_cost": 12.84,
"unit_time_s": 184,
"unpriced_by_design": true,
"unpriced_reason": "string",
"unpriced_remedy": "string"
}
],
"shared_sheets": {
"groups": [
{
"components": [],
"cost_alone": 0,
"cost_together": 0,
"gauge_mm": 0,
"material_category": "string",
"material_display_code": "string",
"saving": 0
}
],
"reason": "string",
"state": "solving"
},
"status": "string",
"terminal": false
}
Cancel Calculation
POST /api/v1/calculations/{calculation_id}/cancel
Cancel a queued / running / polling calculation.
Idempotent: a terminal row is returned untouched. The wallet hold is released as part of the transition so a cancelled calc never debits the org's balance.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/cancel \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/cancel",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/cancel", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
batch_id |
string | Groups the runs of a multi-environment quote; compare them via GET /calculations/batches/{batch_id}/comparison. Null for a single-environment quote. |
costing_environment_id |
string | UUID of the costing environment this calculation is priced against — the one you supplied, or your organization's default when you omitted it. Always echoed so a caller that omitted the field can tell which rates the quote used. |
coverage |
CalculationCoverage | Populated only when status='blocked': the calc was created but NOT enqueued because billing holds it (reason). Explains how many parts can still run and what lifts the block. null whenever the calc was enqueued. |
environment_runs |
EnvironmentRunStatus[] | All runs of a multi-environment quote, one per requested environment in comparison order. The top-level fields describe the first created run; poll each run (or the batch comparison) for results. Null for a single-environment quote. |
error |
string | Why the calculation failed, when this response already carries a terminal failed status — a run refused at submit time, before any worker. Null in every other case, including a normal enqueue: a run that fails LATER reports through the calculation itself, not through the response that started it. |
eta_basis |
string | How eta_seconds was derived, so the number is auditable: org_rate — divided by YOUR organization's own measured completions per second over the recent window; platform_default — your organization has too little recent history, so the estimate comes from your plan's parallelism and the platform's measured service time. Null when no ETA was computed. |
eta_seconds |
number | Estimated wait before this calculation reaches a result, derived from its queue position divided by a measured completion rate (advisory); null when not enqueued. See eta_basis for which rate was used. |
id |
string | UUID of the calculation. |
queue_position |
integer | 1-based position among YOUR organization's own queued and running calculations at enqueue time (backpressure hint); null when not enqueued. With tenant fair scheduling active your parts run in parallel with other customers, so another tenant's backlog does not push you back. |
status |
string | Current lifecycle state: 'draft' — created by POST /calculations but not yet submitted; it has no worker and no job and is priced only when you call POST /run — then queued, running, succeeded, failed, cancelled, timed_out, or 'blocked' — created but NOT started because billing holds it (see coverage). A blocked calc has no worker and no job. It starts by itself once a top-up is credited, a payment block ends or a paused balance is released; POST /run resumes it too. A component of an assembly, and a calculation held by its own max_overage_cents, do not start by themselves. |
Example response
{
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"environment_runs": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string",
"status": "string"
}
],
"error": "string",
"eta_basis": "string",
"eta_seconds": 0,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"queue_position": 0,
"status": "string"
}
Make, buy from the catalogue or exclude several assembly components
PATCH /api/v1/calculations/{calculation_id}/components
One sourcing for several components of an assembly at once — what the
bill of materials' selection applies. catalogue and excluded only
re-aggregate the total and bill nothing; make starts the calculation
of each component that has none (under the per-part quota where the
assembly carries that stamp, refused past the assembly's calculation
ceiling) and re-runs a kept one whose inputs changed meanwhile — a
calculation, billed once if it succeeds. Where the assembly's sheet
parts were nested together, a component leaving or joining the made set
changes the nest: every other component on its sheets is priced again on
its own sheet, each a calculation billed once if it succeeds, listed in
rerun_child_calculation_ids — the dry run exactly as the apply. All or
nothing: a refusal for one component, or 402 quota_exceeded where that
many new calculations would be refused, changes none. Each change is the
same statement the single-component PATCH stores (purchased,
excluded, purchased_unit_price), so it survives a re-upload of
the same assembly. With catalogue, purchased_unit_prices states
several purchase prices in the same change: one new total, not one per
price.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
component_keys |
string[] | yes | The components (component_key of their BOM rows). |
dry_run |
boolean | no | Preview what would change and run only. |
purchased_unit_prices |
object | no | With catalogue only: the purchase price per piece of the components named here, so several prices land in one change. 0 is a stated price: a part the customer supplies. Every price is a finite number from 0 to 10,000,000.00 per piece. Every key must be one of component_keys; a component not named keeps the price stated before. |
sourcing |
make | catalogue | excluded | automatic |
yes | make: calculated as made parts — a calculation starts for each one that has none. catalogue: catalogue parts at their purchase price, a price stated before is kept. excluded: taken out of this calculation — no price, no joints, no fixture place. automatic: back to what the file's evidence says; your make, catalogue and exclusion statements go, quantity and material corrections and a purchase price you stated stay. |
Request
curl -X PATCH https://api.arcnm.io/api/v1/calculations/{calculation_id}/components \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"component_keys": [
"string"
],
"sourcing": "make"
}'
import requests
resp = requests.patch(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/components",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"component_keys": [
"string"
],
"sourcing": "make"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/components", {
method: "PATCH",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"component_keys": [
"string"
],
"sourcing": "make"
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
applied |
boolean | False on a dry run. |
calculation_id |
string | |
changed |
string[] | Components whose statement changes. |
overrides |
object | The stored override of each changed component after this call; null where none is left. |
reaggregates |
boolean | Whether the assembly total recomputes. |
requires_recalculation |
string[] | Components the change reaches on the assembly's next calculation: a sub-assembly bought as one unit, made part by part, and a component whose model was not stored. |
rerun_child_calculation_ids |
string[] | Component calculations that run again at the inputs stated now — including the ones this call starts. |
sourcing |
string | |
starts_calculation |
string[] | Components made from now on whose own calculation starts. |
unchanged |
string[] | Components already stated so. |
Example response
{
"applied": true,
"calculation_id": "string",
"changed": [
"string"
],
"overrides": {},
"reaggregates": true,
"requires_recalculation": [
"string"
],
"rerun_child_calculation_ids": [
"string"
],
"sourcing": "string",
"starts_calculation": [
"string"
],
"unchanged": [
"string"
]
}
Override one assembly component (material, quantity, purchased)
PATCH /api/v1/calculations/{calculation_id}/components/{component_key}
Per-component specifiability (§9).
Overridable: material, provided (beigestellt) stock, qty_per,
scrap_pct, and purchased — make or buy, the highest-value
override in practice: true buys the component at the stated price
(a bolt, nut or washer without one at the platform's fastener line),
false makes it. Extracted geometry and recognised features are NOT
overridable here; disagreement goes through the correction/labeling
surface.
A quantity/material change re-runs exactly that component and then
the roll-up — a calculation, billed once if it succeeds; buying a made
component re-runs the roll-up only and bills nothing; making a bought
one starts its own calculation, then the roll-up. Where the assembly's
sheet parts were nested together, any of these changes the nest: every
other component on its sheets is priced again on its own sheet, each a
calculation billed once if it succeeds. rerun_child_calculation_ids
lists every component priced again, the dry run exactly as the apply;
the whole call is refused (402 quota_exceeded, nothing changed, dry
run too) where that many new calculations would be. A sub-assembly
bought as one unit is made part by part on the assembly's next
calculation (requires_recalculation). The override is keyed by the
component's stable key, so it survives re-upload of the same assembly.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
component_key |
path | string | yes |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
clear |
boolean | no | Remove the override. |
dry_run |
boolean | no | Preview the invalidation set only. |
excluded |
boolean | no | true: the component is taken out of this calculation — it carries no price, its contacts are no joints and it takes no fixture place; the row stays in the bill of materials. false: it is calculated again, made or as a catalogue part as before. |
material_grade_id |
string | no | Override this component's material grade. |
material_is_provided |
boolean | no | Customer-supplied (beigestellt) stock. |
provided_stock_kind |
string | no | Kind of the provided stock. |
purchased |
boolean | no | true: the component is bought — priced at the purchase price below (or, for a bolt, nut or washer, the platform's fastener line), never manufactured. false: the component is made — a bought component's calculation starts. |
purchased_unit_price |
number | no | Purchase price per piece, from 0 to 10,000,000.00. 0 is a stated price: a part the customer supplies (beigestellt). |
qty_per |
number | no | Corrected occurrences per assembly (1 … 10 000). |
scrap_pct |
number | no | Scrap fraction added to this component's lot. |
Request
curl -X PATCH https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/{component_key} \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"clear": false,
"dry_run": false,
"excluded": true,
"material_grade_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"material_is_provided": true,
"provided_stock_kind": "string",
"purchased": true,
"purchased_unit_price": 0,
"qty_per": 0,
"scrap_pct": 0
}'
import requests
resp = requests.patch(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/{component_key}",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"clear": False,
"dry_run": False,
"excluded": True,
"material_grade_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"material_is_provided": True,
"provided_stock_kind": "string",
"purchased": True,
"purchased_unit_price": 0,
"qty_per": 0,
"scrap_pct": 0
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/{component_key}", {
method: "PATCH",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"clear": false,
"dry_run": false,
"excluded": true,
"material_grade_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"material_is_provided": true,
"provided_stock_kind": "string",
"purchased": true,
"purchased_unit_price": 0,
"qty_per": 0,
"scrap_pct": 0
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
applied |
boolean | False on a dry run. |
calculation_id |
string | |
component |
string | The component key the override targets. |
override |
object | The stored override after this call. |
reaggregates |
boolean | Whether the assembly total recomputes. |
requires_recalculation |
boolean | True when the change applies on the assembly's next calculation, not this one: a sub-assembly bought as one unit is made part by part only when the assembly is calculated again, and so is a bought component whose model was not stored. |
rerun_child_calculation_ids |
string[] | Component calculations that run at the new inputs — including one this call starts. |
starts_calculation |
boolean | True when a bought component is made from now on: its own calculation starts. |
Example response
{
"applied": true,
"calculation_id": "string",
"component": "string",
"override": {},
"reaggregates": true,
"requires_recalculation": false,
"rerun_child_calculation_ids": [
"string"
],
"starts_calculation": false
}
Attach one drawing to one component of the assembly
POST /api/v1/calculations/{calculation_id}/components/{component_key}/drawing
One drawing for one part, decided by the person: the file joins the
assembly's drawing pack and is attached to the component named by
component_key (from the bill of materials) without any matching.
The component is priced again with it — a calculation, billed once if
it succeeds, as is each other component of a shared-sheet nest it
changes; refused (402 quota_exceeded) where that many new ones would
be, the file then staying attached — and the assembly total re-settles
when it finishes. A file already in the pack (same bytes) is moved to
this component rather than stored twice. Uploads are not billed.
rerun_child_calculation_ids names every calculation the request
queued; dry_run names them before anything is stored or runs, and
files is then empty. With max_calculations (the count the dry run
named) a request that would now price more is refused (409
reprice_set_changed), nothing stored or changed.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
component_key |
path | string | yes | |
dry_run |
query | boolean | no | Answer what the request would price again (rerun_child_calculation_ids) without storing the file, attaching it or queuing anything; refused exactly where the request would be. |
max_calculations |
query | integer | no | The most calculations the caller agreed to bill, usually the count of a dry run's rerun_child_calculation_ids. When the request would now price more it is refused (409 reprice_set_changed) and nothing is stored or changed; details.calculations and details.calculation_ids name what it would bill now. |
Request body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
file |
string | yes | The component's drawing: one PDF, PNG or JPEG. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/{component_key}/drawing \
-H "X-API-Key: $ARCNM_API_KEY" \
-F "[email protected]"
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/{component_key}/drawing",
headers={"X-API-Key": "YOUR_API_KEY"},
files={
"file": open("file.bin", "rb"),
},
)
resp.raise_for_status()
print(resp.json())
const form = new FormData()
form.append("file", file) // a File or Blob
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/{component_key}/drawing", {
method: "POST",
headers: { "X-API-Key": process.env.ARCNM_API_KEY! },
body: form,
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
applied |
boolean | True when the files were matched against the bill of materials now. False when the assembly has not been split into its parts yet: the files wait and are matched at that moment, so every component prices with its drawing on its first run. |
calculation_id |
string | |
drawings |
AssemblyDrawingsOut | The whole pack after this call, when a BOM exists. |
files |
AssemblyDrawingEntryOut[] | The files this call touched. |
n_assembly |
integer | |
n_matched |
integer | |
n_unassigned |
integer | |
rerun_child_calculation_ids |
string[] | Components re-priced because their drawing changed; the assembly total re-settles when they finish. |
skipped_files |
SkippedUploadFile[] | Drawings this call sent that do not open, left out with their reason; the others were taken. Null when every file was taken. |
Example response
{
"applied": true,
"calculation_id": "string",
"drawings": {
"assembly": {
"added_at": "string",
"basis": "string",
"candidates": [
{}
],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [
{}
],
"title": "string"
},
"n_files": 0,
"n_matched": 0,
"n_unassigned": 0,
"n_with_drawing": 0,
"unassigned": [
{
"added_at": "string",
"basis": "string",
"candidates": [],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [],
"title": "string"
}
]
},
"files": [
{
"added_at": "string",
"basis": "string",
"candidates": [
{}
],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [
{}
],
"title": "string"
}
],
"n_assembly": 0,
"n_matched": 0,
"n_unassigned": 0,
"rerun_child_calculation_ids": [
"string"
],
"skipped_files": [
{
"code": "string",
"filename": "bracket.step"
}
]
}
Price one component of the assembly again, in place
POST /api/v1/calculations/{calculation_id}/components/{component_key}/run
Price one made component again where it stands: its own calculation
runs again at its inputs as they are now — a drawing, a correction or an
environment change made after it ran — and the assembly re-totals when
it finishes. No new calculation id is made, but the run is a calculation
like any other: billed once if it succeeds, and refused (402
quota_exceeded) where a new calculation would be, the component
keeping its price. Where the assembly's sheet parts were nested
together, the others on its sheets are priced again on their own, each
a calculation too, behind the same refusal. Until 2026-11-18 a run in
place billed nothing.
calculation_ids names every calculation the request queued, the
others on the component's sheets included; dry_run names them
before anything runs. With max_calculations (the count the dry run
named) a run that would now bill more is refused (409
reprice_set_changed), nothing changed.
A component already queued or running is returned as it is. One whose
calculation failed, was cancelled or timed out runs again through
POST /calculations/{id}/run (409 component_not_succeeded); a
catalogue part or an excluded one runs no calculation (409
component_not_made). An assembly that was cancelled, timed out or is
paused for billing is not re-opened by one component (409
assembly_not_open).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
component_key |
path | string | yes | |
dry_run |
query | boolean | no | Answer what the run would queue and bill (calculation_ids) without queuing anything; refused exactly where the run would be. |
max_calculations |
query | integer | no | The most calculations the caller agreed to bill, usually the count of a dry run's calculation_ids. When the run would now bill more it is refused (409 reprice_set_changed) and nothing changes; details.calculations and details.calculation_ids name what it would bill now. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/{component_key}/run \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/{component_key}/run",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/{component_key}/run", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
202 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
402 |
insufficient_funds |
The pre-authorised wallet hold for the run exceeds your balance. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 202
| Field | Type | Description |
|---|---|---|
batch_id |
string | Groups the runs of a multi-environment quote; compare them via GET /calculations/batches/{batch_id}/comparison. Null for a single-environment quote. |
calculation_ids |
string[] | Every calculation this request queued: the component's own and, where the assembly's sheet parts were nested together, each other component on its sheets. Each is billed once it succeeds. On a dry run, the ones it would queue — nothing is queued or billed. Empty when the component was already queued or running. |
costing_environment_id |
string | UUID of the costing environment this calculation is priced against — the one you supplied, or your organization's default when you omitted it. Always echoed so a caller that omitted the field can tell which rates the quote used. |
coverage |
CalculationCoverage | Populated only when status='blocked': the calc was created but NOT enqueued because billing holds it (reason). Explains how many parts can still run and what lifts the block. null whenever the calc was enqueued. |
environment_runs |
EnvironmentRunStatus[] | All runs of a multi-environment quote, one per requested environment in comparison order. The top-level fields describe the first created run; poll each run (or the batch comparison) for results. Null for a single-environment quote. |
error |
string | Why the calculation failed, when this response already carries a terminal failed status — a run refused at submit time, before any worker. Null in every other case, including a normal enqueue: a run that fails LATER reports through the calculation itself, not through the response that started it. |
eta_basis |
string | How eta_seconds was derived, so the number is auditable: org_rate — divided by YOUR organization's own measured completions per second over the recent window; platform_default — your organization has too little recent history, so the estimate comes from your plan's parallelism and the platform's measured service time. Null when no ETA was computed. |
eta_seconds |
number | Estimated wait before this calculation reaches a result, derived from its queue position divided by a measured completion rate (advisory); null when not enqueued. See eta_basis for which rate was used. |
id |
string | UUID of the calculation. |
queue_position |
integer | 1-based position among YOUR organization's own queued and running calculations at enqueue time (backpressure hint); null when not enqueued. With tenant fair scheduling active your parts run in parallel with other customers, so another tenant's backlog does not push you back. |
status |
string | Current lifecycle state: 'draft' — created by POST /calculations but not yet submitted; it has no worker and no job and is priced only when you call POST /run — then queued, running, succeeded, failed, cancelled, timed_out, or 'blocked' — created but NOT started because billing holds it (see coverage). A blocked calc has no worker and no job. It starts by itself once a top-up is credited, a payment block ends or a paused balance is released; POST /run resumes it too. A component of an assembly, and a calculation held by its own max_overage_cents, do not start by themselves. |
Example response
{
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"calculation_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"environment_runs": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string",
"status": "string"
}
],
"error": "string",
"eta_basis": "string",
"eta_seconds": 0,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"queue_position": 0,
"status": "string"
}
Calculate the made components of an assembly that have no price yet
POST /api/v1/calculations/{calculation_id}/components/calculate
Calculate the rest, on this assembly: every made component without a
price that a calculation can still price — the rows whose rest is
calculate. A calculation that was cancelled or timed out runs again,
spending one attempt of its retry budget as /run does (one with none
left is priced only by a new calculation of the assembly);
a component with a stored model and no calculation (held back by the
plan's quota, or its calculation deleted) starts one, under the per-part
quota where the assembly carries that stamp and within the assembly's
calculation ceiling. The components already priced keep their figures —
except, where the assembly's sheet parts were nested together, the ones
on the nest's sheets, each priced again on its own sheet — and the
assembly re-totals once the new ones are done. Every component this
prices is a calculation billed once if it succeeds, listed in
child_calculation_ids (preview too); all or nothing, refused (402
quota_exceeded) where that many new calculations would be.
409 nothing_to_calculate when no component is left that this call
prices; details.requires_recalculation then counts the ones only a
new calculation of the assembly prices (no model of them was stored).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/calculate \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/calculate",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/components/calculate", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
applied |
boolean | False on a dry run. |
calculation_id |
string | |
child_calculation_ids |
string[] | The component calculations this call queues. |
requires_recalculation |
string[] | Components only a new calculation of the assembly prices: no model of them was stored. |
retried |
string[] | Components whose cancelled or timed-out calculation runs again. |
started |
string[] | Components (component_key) whose calculation starts from their stored model: held back by the plan's quota, or deleted. |
Example response
{
"applied": true,
"calculation_id": "string",
"child_calculation_ids": [
"string"
],
"requires_recalculation": [
"string"
],
"retried": [
"string"
],
"started": [
"string"
]
}
Itemised cost sheet for one calculation at one lot size
GET /api/v1/calculations/{calculation_id}/cost-sheet
The cost breakdown as the tree it was built as: one line per cost category, the tiers beneath it, and the time and rate each one is made of. Pass quantity for any lot size a calculation accepts: a quantity on the calculation's lot-size curve is answered from the figures recorded while pricing, any other from the same closed form the curve was built from — see basis. Omit it for the lot the calculation was priced at. Calculations priced before the sheet existed are answered from the figures they stored — see rebuilt.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
quantity |
query | integer | no | Lot size to read the sheet at, from 1 up to the largest lot a calculation accepts. A quantity on the lot-size curve (analytics.lot_size_curve.points) is answered from what was recorded while pricing; any other is restated from the calculation's own closed form. A calculation that records no closed form (priced before it existed, or a catalogue part) answers only the quantities on its curve. Defaults to the lot the calculation was priced for. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/{calculation_id}/cost-sheet \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/cost-sheet",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/cost-sheet", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
basis |
priced | curve_point | restated |
Where the quantity's figures come from: 'priced' — the lot the calculation was run for (exact); 'curve_point' — a quantity on its lot-size curve, recorded while pricing; 'restated' — any other quantity, priced from the same closed form the curve was built from (the same arithmetic, so a restated quantity and a curve point can never disagree). Absent on calculations that record no curve. |
cost_sheet |
PublicCostSheet | The cost lines, the tiers beneath them, and the time and rate each one is built from, for the lot size asked for. |
point |
PublicLotSizePoint | The lot-size curve point for the quantity asked for — its unit cost, offer price and times — when quantity was given. |
rebuilt |
boolean | True when the sheet was reconstructed from the rates, times and cost lines this calculation stored rather than recorded while it was priced. A reconstructed sheet carries the cost lines, the surcharge ladder and the tiers that are local to this lot size, but not the per-machine, per-clamping or per-operation detail — that is recorded only while pricing and cannot be derived afterwards. Every amount is the amount charged either way. |
Example response
{
"basis": "priced",
"cost_sheet": {
"currency": "EUR",
"lines": [
{
"amount": 0,
"bucket": "string",
"children": [],
"door": {},
"evidence": {},
"exact": 0,
"factors": [],
"formula_id": "string",
"label_id": "string",
"label_params": {},
"line_kind": "string",
"op_refs": [],
"rate": {},
"terms": [],
"time_basis": "string",
"time_s": 184
}
],
"lot_size": 50,
"notes": [
{
"bucket": "string",
"code": "string",
"residual": 0
}
],
"quantity_basis": 0,
"reconciled": true,
"residual": 0,
"total": 0,
"version": 0
},
"point": {
"bench_time_s": 184,
"cost_sheet": {
"currency": "EUR",
"lines": [
{}
],
"lot_size": 50,
"notes": [
{}
],
"quantity_basis": 0,
"reconciled": true,
"residual": 0,
"total": 0,
"version": 0
},
"direct_unit_cost": 0,
"effective_unit_cost": 0,
"effective_unit_cost_by_scenario": {},
"machine_id_at_n": "string",
"machine_ids_at_n": [
"string"
],
"machine_name_at_n": "string",
"machine_time_s": 184,
"offer_price": 0,
"quantity": 0,
"replan_at_lot": 0,
"replan_recommended": true,
"run_time_s": 184,
"setup_time_s": 184,
"unit_cost": 12.84,
"unit_time_s": 184
},
"rebuilt": true
}
Make a stored drawing this part's drawing
POST /api/v1/calculations/{calculation_id}/drawing
Attach a drawing to the part this calculation prices, by naming it — whatever the two files are called — and price the part again with it.
The drawing is one already stored (data_source_id: a confirmed upload,
or a drawing attached to another part) or the file itself
(drawing_file_b64, stored with this call; uploads are not billed). It
becomes the active drawing of the calculation's part revision; the
drawing it replaces stays stored and detaches from the revision. The
same drawing again changes nothing (changed false).
With run true (the default) and a changed drawing, the part is priced
again as a new calculation on the same revision, environment and lot
(new_calculation), through the same path as a quote: a run billable
only if it succeeds. A component of an assembly is priced again in place
(rerun_calculation_id), billable the same way, and the assembly total
re-settles. A calculation
that has not started yet reads the drawing when it runs, so nothing new
runs for it. With run true, a payment-blocked organization is refused
before anything is stored or attached; once the plan's included
calculations are used up, the drawing stays attached and the answer is
the quota_exceeded (402) a quote gets.
Refused: data_source_not_found (404) for a file outside your
organization; upload_pending / upload_rejected (409) for an upload
not yet confirmed, or refused when checked; drawing_in_precheck (409)
for a drawing of a precheck that has not started, which deletes it when
it is discarded or expires; not_a_drawing (422) for a
file that is not a PDF, PNG or JPEG; assembly_parent (409) for an
assembly — its drawings go through POST /calculations/{id}/drawings;
concurrent_upload_conflict (409) when another drawing was attached to
the part at the same moment — ask again. Deleting the dataset link named
in the answer detaches the drawing.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
data_source_id |
string | no | A drawing already stored in your organization: the id an upload answers once confirmed (POST /uploads/confirm), or the data_source_id of a drawing attached to this or another part. Exactly one of data_source_id and drawing_file_b64. |
drawing_content_type |
string | no | MIME type of drawing_file_b64, when known. |
drawing_file_b64 |
string | no | The drawing itself — PDF, PNG or JPEG — as a base64 (or data: URI) string, stored with this call. Exactly one of data_source_id and drawing_file_b64. |
drawing_filename |
string | no | Filename of drawing_file_b64, including its extension; drawing.pdf when omitted. |
drawing_sha256 |
string | no | SHA-256 of the file itself (before base64 and any gzip), hex. When sent, the file is refused with 422 checksum_mismatch unless it arrived with exactly this digest — nothing is stored or calculated then. |
run |
boolean | no | Price the part again with this drawing once it is attached: a new calculation on the same revision, environment and lot, answered in new_calculation; a component of an assembly is priced again in place. False attaches only — the next calculation of the revision reads the drawing. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/drawing \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"drawing_content_type": "string",
"drawing_file_b64": "string",
"drawing_filename": "bracket.step",
"drawing_sha256": "9f86d081884c7d659a2feaa0c55ad015…",
"run": true
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/drawing",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"drawing_content_type": "string",
"drawing_file_b64": "string",
"drawing_filename": "bracket.step",
"drawing_sha256": "9f86d081884c7d659a2feaa0c55ad015…",
"run": True
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/drawing", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"drawing_content_type": "string",
"drawing_file_b64": "string",
"drawing_filename": "bracket.step",
"drawing_sha256": "9f86d081884c7d659a2feaa0c55ad015…",
"run": true
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
calculation_id |
string | The calculation the drawing was named for. |
changed |
boolean | False when this drawing was already the part's drawing: nothing was attached and nothing runs. |
data_source_id |
string | The drawing, as stored. |
inputs_changed_since_run |
InputsChangedSinceRun | This calculation's own answer after the attach: set when it has finished and the drawing is not in its result; null while its run is still ahead. |
link_id |
string | The part revision's dataset link the drawing is attached by. Deleting that link (DELETE /parts/{part_id}/revisions/{revision_id}/datasets/{link_id}) detaches the drawing again. |
new_calculation |
CalculationStatus | The calculation that prices the part with this drawing, when run is true and the drawing changed: a new calculation on the same revision, environment and lot, recorded as derived from this one. Its status says what happened — queued is a run, blocked a run parked for coverage. Null when nothing runs: the same drawing again, run false, a component of an assembly (see rerun_calculation_id), or a calculation that has not started yet — it reads the drawing when it runs. |
rerun_calculation_id |
string | For a component of an assembly: the component's own calculation, priced again in place with the drawing; the assembly total re-settles when it finishes. Null otherwise. |
sha256 |
string | The server's SHA-256 of the stored drawing, hex. |
Example response
{
"calculation_id": "string",
"changed": true,
"data_source_id": "string",
"inputs_changed_since_run": {
"corrections": 0,
"latest_at": "string",
"removed_roles": [
"string"
],
"roles": [
"string"
]
},
"link_id": "string",
"new_calculation": {
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"environment_runs": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string",
"status": "string"
}
],
"error": "string",
"eta_basis": "string",
"eta_seconds": 0,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"queue_position": 0,
"status": "string"
},
"rerun_calculation_id": "string",
"sha256": "9f86d081884c7d659a2feaa0c55ad015…"
}
Add the drawings for an assembly's parts, all at once
POST /api/v1/calculations/{calculation_id}/drawings
Attach the 2D drawings of an assembly's components in one upload.
Each file is matched to a component by the names both already carry:
the drawing number the title block states or the filename against the
component's product id from the CAD file, and the title block's part
name against the component's designation. A file naming the assembly
itself becomes the assembly drawing. A matched file is attached to the
component and the component is priced again with it — a calculation,
billed once if it succeeds, as is each other component of a shared-sheet
nest it changes; where that many new calculations would be refused (402
quota_exceeded) the files stay attached and nothing is priced again.
The assembly total re-settles when the components finish. A
file that matches
nothing, or more than one component, is kept and listed as unassigned
beside the bill of materials for a one-click decision — it is never
guessed.
Uploaded before the assembly has been split into its parts, the files
wait and are matched at that moment, so every component prices with
its drawing on its first run; an upload sent with drawings_follow
holds its split for them. Uploads are not billed.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
files |
string[] | yes | The drawings, one file each (PDF, PNG or JPEG) — the assembly's own drawing may be among them. Repeat the field once per file. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/drawings \
-H "X-API-Key: $ARCNM_API_KEY" \
-F "files=string"
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/drawings",
headers={"X-API-Key": "YOUR_API_KEY"},
data={
"files": "string",
},
)
resp.raise_for_status()
print(resp.json())
const form = new FormData()
form.append("files", "string")
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/drawings", {
method: "POST",
headers: { "X-API-Key": process.env.ARCNM_API_KEY! },
body: form,
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
applied |
boolean | True when the files were matched against the bill of materials now. False when the assembly has not been split into its parts yet: the files wait and are matched at that moment, so every component prices with its drawing on its first run. |
calculation_id |
string | |
drawings |
AssemblyDrawingsOut | The whole pack after this call, when a BOM exists. |
files |
AssemblyDrawingEntryOut[] | The files this call touched. |
n_assembly |
integer | |
n_matched |
integer | |
n_unassigned |
integer | |
rerun_child_calculation_ids |
string[] | Components re-priced because their drawing changed; the assembly total re-settles when they finish. |
skipped_files |
SkippedUploadFile[] | Drawings this call sent that do not open, left out with their reason; the others were taken. Null when every file was taken. |
Example response
{
"applied": true,
"calculation_id": "string",
"drawings": {
"assembly": {
"added_at": "string",
"basis": "string",
"candidates": [
{}
],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [
{}
],
"title": "string"
},
"n_files": 0,
"n_matched": 0,
"n_unassigned": 0,
"n_with_drawing": 0,
"unassigned": [
{
"added_at": "string",
"basis": "string",
"candidates": [],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [],
"title": "string"
}
]
},
"files": [
{
"added_at": "string",
"basis": "string",
"candidates": [
{}
],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [
{}
],
"title": "string"
}
],
"n_assembly": 0,
"n_matched": 0,
"n_unassigned": 0,
"rerun_child_calculation_ids": [
"string"
],
"skipped_files": [
{
"code": "string",
"filename": "bracket.step"
}
]
}
Decide where one drawing of the pack belongs
POST /api/v1/calculations/{calculation_id}/drawings/{data_source_id}/assign
Attach one pack file to a component (component_key from the bill
of materials), make it the assembly drawing, or discard it. A
component whose drawing changes is priced again — a calculation, billed
once if it succeeds, as is each other component of a shared-sheet nest
it changes; refused (402 quota_exceeded) where that many new ones
would be. The assembly total re-settles when they finish.
dry_run names those calculations (rerun_child_calculation_ids)
before anything changes; files is then empty. With
max_calculations (the count the dry run named) a decision that
would now price more is refused (409 reprice_set_changed), nothing
changed.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
data_source_id |
path | string | yes | Identifier of the data source. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
component_key |
string | no | Required for component. |
dry_run |
boolean | no | Answer what the decision would price again (rerun_child_calculation_ids) without making it: nothing is attached, queued or billed. Refused exactly where the decision would be. |
max_calculations |
integer | no | The most calculations the caller agreed to bill, usually the count of a dry run's rerun_child_calculation_ids. When the decision would now price more it is refused (409 reprice_set_changed) and nothing changes; details.calculations and details.calculation_ids name what it would bill now. |
target |
component | assembly | discard |
yes | component attaches the file to component_key; assembly makes it the assembly's own drawing; discard detaches it and drops it from the pack. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/drawings/{data_source_id}/assign \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"target": "component"
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/drawings/{data_source_id}/assign",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"target": "component"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/drawings/{data_source_id}/assign", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"target": "component"
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
applied |
boolean | True when the files were matched against the bill of materials now. False when the assembly has not been split into its parts yet: the files wait and are matched at that moment, so every component prices with its drawing on its first run. |
calculation_id |
string | |
drawings |
AssemblyDrawingsOut | The whole pack after this call, when a BOM exists. |
files |
AssemblyDrawingEntryOut[] | The files this call touched. |
n_assembly |
integer | |
n_matched |
integer | |
n_unassigned |
integer | |
rerun_child_calculation_ids |
string[] | Components re-priced because their drawing changed; the assembly total re-settles when they finish. |
skipped_files |
SkippedUploadFile[] | Drawings this call sent that do not open, left out with their reason; the others were taken. Null when every file was taken. |
Example response
{
"applied": true,
"calculation_id": "string",
"drawings": {
"assembly": {
"added_at": "string",
"basis": "string",
"candidates": [
{}
],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [
{}
],
"title": "string"
},
"n_files": 0,
"n_matched": 0,
"n_unassigned": 0,
"n_with_drawing": 0,
"unassigned": [
{
"added_at": "string",
"basis": "string",
"candidates": [],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [],
"title": "string"
}
]
},
"files": [
{
"added_at": "string",
"basis": "string",
"candidates": [
{}
],
"component_key": "string",
"data_source_id": "string",
"drawing_number": "string",
"filename": "bracket.step",
"material": "string",
"note": "string",
"page_count": 0,
"position": 0,
"size_bytes": 204800,
"status": "string",
"suggestions": [
{}
],
"title": "string"
}
],
"n_assembly": 0,
"n_matched": 0,
"n_unassigned": 0,
"rerun_child_calculation_ids": [
"string"
],
"skipped_files": [
{
"code": "string",
"filename": "bracket.step"
}
]
}
Upload Inputs
POST /api/v1/calculations/{calculation_id}/inputs
Attach a 2D drawing, a mesh, or an RFQ text file to the calculation.
Accepted per role: drawing_2d → PDF, PNG, JPEG; mesh → STL, OBJ;
rfq_text → plain text, Markdown, PDF. A mesh carries no B-rep, so it
yields envelope, mass and surface area only — attach STEP at creation
time for a fully-featured quote.
The file is stored against the calculation's part revision under the
requested role. Subsequent POST /run calls auto-discover it by
role and fold it into the analysis (drawing, mesh fallback, RFQ text)
alongside the primary geometry.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
file |
string | yes | The file to attach: a 2D drawing (PDF, PNG or JPEG), an STL/OBJ mesh, or an RFQ text file. |
role |
drawing_2d | mesh | rfq_text |
yes | Role the file plays on the calculation's revision: drawing_2d, mesh, or rfq_text. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/inputs \
-H "X-API-Key: $ARCNM_API_KEY" \
-F "role=drawing_2d" \
-F "[email protected]"
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/inputs",
headers={"X-API-Key": "YOUR_API_KEY"},
files={
"file": open("file.bin", "rb"),
},
data={
"role": "drawing_2d",
},
)
resp.raise_for_status()
print(resp.json())
const form = new FormData()
form.append("role", "drawing_2d")
form.append("file", file) // a File or Blob
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/inputs", {
method: "POST",
headers: { "X-API-Key": process.env.ARCNM_API_KEY! },
body: form,
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
calculation_id |
string | UUID of the calculation the file was attached to. |
data_source_id |
string | UUID of the stored data source created for the uploaded file. |
inputs_changed_since_run |
InputsChangedSinceRun | Set when this calculation has already finished: the file just attached (and any other newer input) is not in its result. Price the part again to read it; null while the run is still ahead. |
role |
string | Role the file was attached under (e.g. drawing_2d, mesh, rfq_text). |
sha256 |
string | Hex-encoded SHA-256 digest of the uploaded bytes. |
size_bytes |
integer | Size of the uploaded file in bytes. |
Example response
{
"calculation_id": "string",
"data_source_id": "string",
"inputs_changed_since_run": {
"corrections": 0,
"latest_at": "string",
"removed_roles": [
"string"
],
"roles": [
"string"
]
},
"role": "primary",
"sha256": "9f86d081884c7d659a2feaa0c55ad015…",
"size_bytes": 204800
}
Patch Calculation Material
PATCH /api/v1/calculations/{calculation_id}/material
Override the material on a calculation that has not succeeded.
The override applies before the first successful run: to a draft, or
to a run that failed, was cancelled or timed out. The reference
resolves exactly as POST /calculations resolves it on create.
Nothing is re-priced here — follow up with
POST /calculations/{calculation_id}/run to price the part in the
new material, so you can review the override before the next run.
A succeeded calculation is the record of the run that priced it and
answers 409 calculation_already_succeeded. To re-price it in
another material, create a re-run: POST /calculations (or
POST /calculations/quote) with derived_from_calculation_id set
to it and the new material_ref. The re-run keeps the parent's lot
size, annual volume and material supply unless you state them.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
material_grade_id |
string | no | UUID of the material grade to link. Provide this or material_ref. |
material_ref |
string | no | Material reference (URN, Werkstoffnummer, or trade name) to resolve and link. Provide this or material_grade_id. |
Request
curl -X PATCH https://api.arcnm.io/api/v1/calculations/{calculation_id}/material \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"material_grade_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"material_ref": "1.4301"
}'
import requests
resp = requests.patch(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/material",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"material_grade_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"material_ref": "1.4301"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/material", {
method: "PATCH",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"material_grade_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"material_ref": "1.4301"
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
id |
string | UUID of the calculation that was updated. |
material_grade_id |
string | UUID of the newly assigned material grade. |
material_ref |
string | Material reference (URN) of the newly assigned grade; null when unavailable. |
previous_material_grade_id |
string | UUID of the material grade before this change; null if none was set. |
resolved_via |
string | How the grade was resolved: a directly supplied grade id, or a free-form reference lookup. |
Example response
{
"id": "string",
"material_grade_id": "string",
"material_ref": "1.4301",
"previous_material_grade_id": "string",
"resolved_via": "string"
}
Optimization directions for a calculation
GET /api/v1/calculations/{calculation_id}/optimization
Research-grounded cost-optimization directions for one priced calculation: lot sizing, setup reduction, tolerance-cost review, material utilization, external-process benchmarking, plus agent-grade signals (inspection/programming shares, volume-bundling elasticity, DFM issues) and the live supplier-quote gap where a quote exists. Every figure derives from this calculation's own engine results.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/{calculation_id}/optimization \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/optimization",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/optimization", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
calculation_id |
string | Identifier of the calculation. |
currency |
string | Currency of the money figures. |
environment_changed_since_run |
EnvironmentChangedSinceRun | Null when the run these directions derive from was priced on its costing environment as it stands. Otherwise the environment was edited after the run read it (latest_at) — a new calculation prices with the current setup, these figures do not. The same value GET /calculations/{id} states. |
findings |
OptimizationDirection[] | Optimization directions; empty when the calculation predates the findings engine or nothing material fired. |
inputs_changed_since_run |
InputsChangedSinceRun | Null when the run these directions derive from reflects every input on its part revision. Otherwise the roles (drawing_2d, mesh, rfq_text) whose active file was attached after the run read its inputs, and the number of corrections applied to the part since — the next run reads them, these figures do not. The same value GET /calculations/{id} states. |
status |
string | Calculation status the findings derive from. |
Example response
{
"calculation_id": "string",
"currency": "EUR",
"environment_changed_since_run": {
"latest_at": "string"
},
"findings": [
{
"audience": "string",
"confidence": "string",
"kind": "string",
"lever": "string",
"method": "string",
"params": {},
"saving_per_piece": 0,
"saving_per_year": 0
}
],
"inputs_changed_since_run": {
"corrections": 0,
"latest_at": "string",
"removed_roles": [
"string"
],
"roles": [
"string"
]
},
"status": "string"
}
Price a calculation under what-if adjustments, without billing it
POST /api/v1/calculations/{calculation_id}/preview
Answers 'what would this part cost if …' over a calculation that is already priced: name the factors to move and read back the whole cost sheet plus the change per category. It reuses this calculation's own inputs and produces nothing you keep — no new calculation, no change to this one, no change to your environment — and it consumes none of your included calculations. Adjustments are checked against each factor's band before anything is priced, and a request that cannot be answered exactly is refused by name rather than answered approximately.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
adjustments |
object | no | Factors to move, by name, each to the value given. The names are the ones a cost-sheet line lists in factors and the environment's factor endpoint publishes: a factor stated per process carries its process (time.setup_efficiency.milling), a shop-wide one does not. Every value is checked against that factor's own band before anything is priced. Leave empty to price the same factors at a different lot size. |
lot_size |
integer | no | Quantity to price at. Omit to keep the quantity the calculation was priced for. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/preview \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"adjustments": {},
"lot_size": 50
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/preview",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"adjustments": {},
"lot_size": 50
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/preview", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"adjustments": {},
"lot_size": 50
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
cost_sheet |
PublicCostSheet | The itemised cost sheet as priced under the adjustments. |
delta |
object | Change per top-level cost category against the priced calculation, in the sheet's currency: new minus current. A category on only one side carries its whole amount, so a line that appears or disappears is visible rather than skipped. |
total_delta |
number | Change in the cost per part against the priced calculation, in the sheet's currency: new minus current. On the same basis as the calculation's own unit_cost — the manufacturing cost, before the surcharges and mark-up your environment states. The offer price is the sum of every top-level line of cost_sheet, and each of those surcharge lines has its own entry in delta. |
Example response
{
"cost_sheet": {
"currency": "EUR",
"lines": [
{
"amount": 0,
"bucket": "string",
"children": [],
"door": {},
"evidence": {},
"exact": 0,
"factors": [],
"formula_id": "string",
"label_id": "string",
"label_params": {},
"line_kind": "string",
"op_refs": [],
"rate": {},
"terms": [],
"time_basis": "string",
"time_s": 184
}
],
"lot_size": 50,
"notes": [
{
"bucket": "string",
"code": "string",
"residual": 0
}
],
"quantity_basis": 0,
"reconciled": true,
"residual": 0,
"total": 0,
"version": 0
},
"delta": {},
"total_delta": 0
}
Run Calculation
POST /api/v1/calculations/{calculation_id}/run
Enqueue the calculation onto the worker queue — subject to coverage.
Idempotent: a row in a non-terminal state (queued/running/polling)
is not re-enqueued; a row in succeeded is returned untouched — a
finished result is a record of one run, so re-pricing the part after
its inputs changed (inputs_changed_since_run) means creating a
new calculation on the same revision and running that;
a row in failed/cancelled/timed_out is reset to
queued and re-enqueued so the user can retry.
Coverage: before enqueueing, the org's included-calculation quota is
checked. No plan stops at its included volume: past it, the run starts
only if the prepaid balance pays the plan's price; otherwise it parks as
blocked with a coverage payload on a 2xx, as does a
payment-blocked (dunning) org. A blocked row starts by itself once a
top-up is credited, the payment block ends or a paused balance is
released (not a component of an assembly, and not one held by its own
max_overage_cents), and this
same path resumes it too, without spending a retry attempt.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
max_overage_cents |
query | integer | no | The most this run may cost past your plan's included calculations, in cents: the price you were shown for it. It only ever lowers a limit the calculation already has. A run that would cost more waits (run_spend_cap) instead of being charged. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/run \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/run",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/run", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
202 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
402 |
insufficient_funds |
The pre-authorised wallet hold for the run exceeds your balance. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 202
| Field | Type | Description |
|---|---|---|
batch_id |
string | Groups the runs of a multi-environment quote; compare them via GET /calculations/batches/{batch_id}/comparison. Null for a single-environment quote. |
costing_environment_id |
string | UUID of the costing environment this calculation is priced against — the one you supplied, or your organization's default when you omitted it. Always echoed so a caller that omitted the field can tell which rates the quote used. |
coverage |
CalculationCoverage | Populated only when status='blocked': the calc was created but NOT enqueued because billing holds it (reason). Explains how many parts can still run and what lifts the block. null whenever the calc was enqueued. |
environment_runs |
EnvironmentRunStatus[] | All runs of a multi-environment quote, one per requested environment in comparison order. The top-level fields describe the first created run; poll each run (or the batch comparison) for results. Null for a single-environment quote. |
error |
string | Why the calculation failed, when this response already carries a terminal failed status — a run refused at submit time, before any worker. Null in every other case, including a normal enqueue: a run that fails LATER reports through the calculation itself, not through the response that started it. |
eta_basis |
string | How eta_seconds was derived, so the number is auditable: org_rate — divided by YOUR organization's own measured completions per second over the recent window; platform_default — your organization has too little recent history, so the estimate comes from your plan's parallelism and the platform's measured service time. Null when no ETA was computed. |
eta_seconds |
number | Estimated wait before this calculation reaches a result, derived from its queue position divided by a measured completion rate (advisory); null when not enqueued. See eta_basis for which rate was used. |
id |
string | UUID of the calculation. |
queue_position |
integer | 1-based position among YOUR organization's own queued and running calculations at enqueue time (backpressure hint); null when not enqueued. With tenant fair scheduling active your parts run in parallel with other customers, so another tenant's backlog does not push you back. |
status |
string | Current lifecycle state: 'draft' — created by POST /calculations but not yet submitted; it has no worker and no job and is priced only when you call POST /run — then queued, running, succeeded, failed, cancelled, timed_out, or 'blocked' — created but NOT started because billing holds it (see coverage). A blocked calc has no worker and no job. It starts by itself once a top-up is credited, a payment block ends or a paused balance is released; POST /run resumes it too. A component of an assembly, and a calculation held by its own max_overage_cents, do not start by themselves. |
Example response
{
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"environment_runs": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string",
"status": "string"
}
],
"error": "string",
"eta_basis": "string",
"eta_seconds": 0,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"queue_position": 0,
"status": "string"
}
List the kept what-ifs for one calculation
GET /api/v1/calculations/{calculation_id}/scenarios
The named adjustment sets saved against this calculation. Each one stores the factors it moves, plus result: a priced snapshot worked out when it was saved or last changed (result.computed_at). A rate or factor edited in the environment since then changes today's answer without changing the snapshot — re-run the preview to see what it costs today.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
lineage |
query | boolean | no | Also return the scenarios kept on the calculations this one was re-run from (its derived_from_calculation_id chain), each row naming the calculation it belongs to — so a what-if kept before a re-run is still in reach on the re-run's page. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
count |
integer | Number of scenarios returned. |
items |
CostScenarioPublic[] | The scenarios, newest first. |
Example response
{
"count": 0,
"items": [
{
"adjustments": {},
"calculation_id": "string",
"created_at": "string",
"id": "string",
"name": "string",
"result": {
"computed_at": "string",
"delta": {},
"message": "string",
"refused": "string",
"total_delta": 0,
"unit_cost": 12.84
},
"updated_at": "string"
}
]
}
Keep a named what-if against one calculation
POST /api/v1/calculations/{calculation_id}/scenarios
Saves a set of factor adjustments under a name so the same question can be asked again later. Every name is checked against the factor list and every value against its band. The scenario stores the inputs; the result it returns is a priced snapshot, worked out once and unbilled at result.computed_at, which goes stale when the environment's rates or factors are edited — preview again to see what it costs today.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
adjustments |
object | no | The factors this what-if moves and the value each is moved to — the same names and the same bands the preview endpoint takes. |
name |
string | yes | Label to find this what-if by later. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"name": "string"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "string"
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
201 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 201
| Field | Type | Description |
|---|---|---|
adjustments |
object | The factors it moves and the value each is moved to. |
calculation_id |
string | Calculation this scenario varies. |
created_at |
string | ISO 8601 timestamp when the scenario was saved. |
id |
string | Identifier of this scenario. |
name |
string | Label given to this what-if. |
result |
CostScenarioResult | What it cost when last worked out — a dated cache of one preview, absent on a scenario saved before it was computed. |
updated_at |
string | ISO 8601 timestamp when the scenario was last changed. |
Example response
{
"adjustments": {},
"calculation_id": "string",
"created_at": "string",
"id": "string",
"name": "string",
"result": {
"computed_at": "string",
"delta": {},
"message": "string",
"refused": "string",
"total_delta": 0,
"unit_cost": 12.84
},
"updated_at": "string"
}
Delete a kept what-if
DELETE /api/v1/calculations/{calculation_id}/scenarios/{scenario_id}
Removes one saved adjustment set. The calculation it varied is untouched.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
scenario_id |
path | string | yes | Identifier of the scenario. |
Request
curl -X DELETE https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios/{scenario_id} \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.delete(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios/{scenario_id}",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios/{scenario_id}", {
method: "DELETE",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
message |
string | Confirmation that the scenario was deleted. |
Example response
{
"message": "string"
}
Rename a kept what-if or replace the factors it moves
PATCH /api/v1/calculations/{calculation_id}/scenarios/{scenario_id}
Changes the label and/or the adjustment set of one saved what-if. A new adjustment set is checked against the factor list and every band exactly as on save, and the scenario's cached result is worked out again.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
scenario_id |
path | string | yes | Identifier of the scenario. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
adjustments |
object | no | The factors this what-if moves, replacing the set it had — the same names and bands the preview endpoint takes. |
name |
string | no | New label. |
Request
curl -X PATCH https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios/{scenario_id} \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"adjustments": {},
"name": "string"
}'
import requests
resp = requests.patch(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios/{scenario_id}",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"adjustments": {},
"name": "string"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/scenarios/{scenario_id}", {
method: "PATCH",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"adjustments": {},
"name": "string"
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
adjustments |
object | The factors it moves and the value each is moved to. |
calculation_id |
string | Calculation this scenario varies. |
created_at |
string | ISO 8601 timestamp when the scenario was saved. |
id |
string | Identifier of this scenario. |
name |
string | Label given to this what-if. |
result |
CostScenarioResult | What it cost when last worked out — a dated cache of one preview, absent on a scenario saved before it was computed. |
updated_at |
string | ISO 8601 timestamp when the scenario was last changed. |
Example response
{
"adjustments": {},
"calculation_id": "string",
"created_at": "string",
"id": "string",
"name": "string",
"result": {
"computed_at": "string",
"delta": {},
"message": "string",
"refused": "string",
"total_delta": 0,
"unit_cost": 12.84
},
"updated_at": "string"
}
Export a calculation's own sheet for cutting
GET /api/v1/calculations/{calculation_id}/sheet-nest/export
The sheet a calculation's own price laid its part out on, as a
cutting file — the part alone, as many copies as its price put on one
sheet. Same files as a job nest's, one sheet, no zip. A calculation
that stored no sheet layout, or that is not cut from sheet, has nothing
to export. A file still being built after a minute is answered 503 with
Retry-After; /sheet-nest/export-url never waits.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
format |
query | dxf | svg | json |
no | dxf (R2010, millimetres: one block per part and one insert per copy, on the layers SHEET, MARGIN, REMNANT, CUT_OUTER, CUT_INNER and LABEL), svg (the same geometry, the view box in millimetres) or json (the nest plan: every part's contour and every sheet's placements). |
exploded |
query | boolean | no | DXF only: write each copy's contours as plain closed polylines in place, no blocks — for a cutting system that does not read block references. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/{calculation_id}/sheet-nest/export \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/sheet-nest/export",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/sheet-nest/export", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
The file — Content-Disposition names it — or, for format=json, the nest plan. |
404 |
No calculation with this id in your organization (calculation_not_found), or its price stored no sheet layout (sheet_layout_not_found). |
422 |
Validation Error |
503 |
The file is still being built (nest_export_timeout): ask again after Retry-After seconds. |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
parts |
NestPlanPart[] | |
sheets |
NestPlanSheet[] | |
source |
NestPlanSource | |
tolerance |
NestPlanTolerance | |
units |
string | |
v |
integer | The schema version. |
Example response
{
"parts": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"holes": [
[]
],
"line_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"net_area_mm2": 0,
"order_ref": "string",
"outline": [
[]
],
"placed": 0,
"quantity": 0,
"ref": "string"
}
],
"sheets": [
{
"container": {
"key": "string",
"kind": "format",
"length_mm": 0,
"width_mm": 0
},
"count": 0,
"gauge_mm": 0,
"group": 0,
"index": 0,
"key": "string",
"margin_mm": 0,
"material": "string",
"placements": [
{}
],
"remnant": {
"length_mm": 0,
"width_mm": 0,
"x_mm": 0,
"y_mm": 0
},
"repeat": 0,
"spacing_mm": 0,
"utilisation": 0
}
],
"source": {
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2026-06-01T12:00:00Z",
"environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"finished_at": "2026-06-01T12:00:00Z",
"kind": "run",
"run_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"tolerance": {
"arcs": "string",
"contour_mm": 0,
"note": "string"
},
"units": "string",
"v": 0
}
Link to a calculation's own sheet for cutting
GET /api/v1/calculations/{calculation_id}/sheet-nest/export-url
The file GET /calculations/{calculation_id}/sheet-nest/export
answers, as a short-lived download link — without waiting for it to
be built.
200: the file is ready; url downloads it (no credentials, until
expires_in_s runs out) under file_name. 202: it is being built;
ask again after Retry-After seconds. A build that was refused is
answered with its own code and status; fresh=true builds it again.
Same parameters, scope and refusals as the export.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
calculation_id |
path | string | yes | Identifier of the calculation. |
format |
query | dxf | svg | json |
no | dxf (R2010, millimetres: one block per part and one insert per copy, on the layers SHEET, MARGIN, REMNANT, CUT_OUTER, CUT_INNER and LABEL), svg (the same geometry, the view box in millimetres) or json (the nest plan: every part's contour and every sheet's placements). |
exploded |
query | boolean | no | DXF only: write each copy's contours as plain closed polylines in place, no blocks — for a cutting system that does not read block references. |
fresh |
query | boolean | no | Build the file again when its last build was refused and nothing is building it now. Without it, a refusal is answered again for a few minutes. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/{calculation_id}/sheet-nest/export-url \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/{calculation_id}/sheet-nest/export-url",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/{calculation_id}/sheet-nest/export-url", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
202 |
The file is being built: ask again after Retry-After seconds. |
404 |
No calculation with this id in your organization (calculation_not_found), or its price stored no sheet layout (sheet_layout_not_found). |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
content_type |
string | |
expires_in_s |
integer | Seconds until the link expires. |
file_name |
string | |
size_bytes |
integer | The file's size in bytes. |
status |
string | |
url |
string | GET it, without credentials, before it expires; the response names the file. |
Example response
{
"content_type": "string",
"expires_in_s": 0,
"file_name": "string",
"size_bytes": 204800,
"status": "string",
"url": "string"
}
Batch re-cost a set of part revisions
POST /api/v1/calculations/batch
Create + enqueue one calculation per revision in a single request, grouped under a CalculationBatch — the path an agent triggers when a market signal (a material price move) makes a batch re-cost worth running. Each run is metered on success against the org's subscription (v5/v6 quota + flat overage), exactly like a single /run — there is no separate per-call wallet draw. Free orgs over their included quota are rejected up front (HTTP 402).
Selection is explicit (part_revision_ids) for now; richer criteria (by material category, above-should-cost, …) layer on top of this path later.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
annual_volume |
integer | no | |
batch_name |
string | no | |
costing_environment_id |
string | no | Single environment to cost against. Omit together with costing_environment_ids to use the organization's default environment (GET /whoami names it). |
costing_environment_ids |
string[] | no | Environments to cost each revision against, in comparison order. Every (revision, environment) pair becomes one calculation and counts as one against the plan quota. Mutually exclusive with costing_environment_id. Duplicates are collapsed preserving first occurrence; revisions x environments may not exceed 500. |
currency |
string | no | |
engine |
string | no | |
engines |
string[] | no | Engines to run per revision. Today a single engine is honoured and any other value is coerced to it. The list shape is preserved for forward-compat with future engines. |
language |
string | no | |
lot_size |
integer | no | |
material_grade_id |
string | no | |
material_is_provided |
boolean | no | |
material_ref |
string | no | Free-form material reference (URN, Werkstoffnummer, AISI/SAE code, trade name, or your SKU); resolved to a material grade for every calculation in the batch. Unresolvable values are rejected with 422 material_unresolved plus ranked candidates. Omit to price the material read from each part's drawing (or the environment default). |
nest_item_id |
string | no | Price this calculation's material on its part's line of a job nest — the id of a line (items[].id) of a job nest that has solved it. The material is then the line's share of the sheets the job nest cut it from together with other parts, less its share of what their skeleton and reusable rests earn back; everything else is priced as usual. The line must be of your organization, of this costing environment and of this part revision, and its job nest must have solved it; otherwise the request is rejected with 422 nest_item_unresolved, details.reason saying why. It cannot be combined with stock_format_id or with customer-supplied material. An upload creates a new part revision, so the upload forms reject every line. A line of the sheets an assembly shares among its own components prices that assembly only: naming one is rejected as not_found, and a re-run of such a component prices it on its own sheet. Omit it to price the part on its own sheet. |
part_revision_ids |
string[] | yes | |
provided_stock_kind |
none | near_net_profile | near_net_casting | sawn_blank |
no | |
raw_material_strategy |
RawMaterialStrategy | no | Deprecated. The raw-material strategy does not set the priced cost — the material comes from material_ref or the part's own drawing, and its price per kilogram from the costing environment's material rate. The block is stored on each calculation as sent. Set material_ref and the environment's material rate instead. It stays accepted on this endpoint; retiring it would be a breaking change and would ship under a new dated API version with advance notice. |
region |
string | no | |
stock_format_id |
string | no | Price this calculation on one stock format — the id of a format from GET /stock-formats. An id names the format, not only the version it came from: when the format has been changed since, the version current on the day the calculation is created is used. An id your organization cannot price with today (unknown, retired or hidden) is rejected with 422 stock_format_unresolved. When the part cannot be cut from that format — too small, not bought in the part's thickness or material, or one the machine cannot load — or is not cut from sheet at all (milled, turned or bought finished), the calculation is priced as if none had been chosen, and analytics.pipeline_notes says why (stock_format_pin_unavailable). Omit it to price on the format that uses the least material per part. |
surface_treatments |
string[] | no | Deprecated. Surface treatments (e.g. anodizing, zinc plating) do not set the priced cost — treatments are read from the part's drawing and priced on cost_decomposition.subcontract_cost. The value is stored on each calculation as sent. Prefer specifying treatments on the drawing. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/batch \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"part_revision_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/batch",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"part_revision_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/batch", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"part_revision_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
202 |
Successful Response |
422 |
Validation Error — or a refused reference: material_unresolved (the material names no grade in the catalogue), stock_format_unresolved (stock_format_id names no stock format your organization prices with today) or nest_item_unresolved (nest_item_id names no job-nest line that can price this calculation; details.reason says why). POST /calculations and /quote also refuse currency_unknown (currency is not an ISO 4217 code) and currency_not_configured (the environment has no exchange rate into currency). |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 202
| Field | Type | Description |
|---|---|---|
batch_id |
string | Groups the created calculations. |
blocked |
integer | Cells created but parked on billing (saved, waiting on a top-up or a billing fix — see coverage); never enqueued, resumable once billing allows. |
costing_environment_ids |
string[] | The environments costed against, in comparison order. |
coverage |
CalculationCoverage | Why cells were parked, when blocked > 0 — the same payload a single-run park response carries. null when nothing parked. |
enqueued |
integer | Calculations created and enqueued. |
items |
BatchCalculationItem[] | |
requested |
integer | Requested cells: distinct revisions × distinct environments. |
served_from_cache |
integer | Deprecated: always 0. Every cell is a calculation of its own and is billed when it succeeds; an identical earlier run no longer answers one. |
skipped |
integer | Cells skipped for structural reasons or unquotable environments (see each item). |
Example response
{
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"blocked": 0,
"costing_environment_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"enqueued": 0,
"items": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"part_revision_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string",
"status": "string"
}
],
"requested": 0,
"served_from_cache": 0,
"skipped": 0
}
Cancel every non-terminal calculation in a batch
POST /api/v1/calculations/batches/{batch_id}/cancel
Convenience for a whole comparison grid: cancels the batch's queued/running members in one call — the per-id equivalent of /bulk-cancel without a round-trip to collect the ids first. Terminal members are reported skipped, exactly as the id-list route would.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
batch_id |
path | string | yes | Identifier of the batch. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/batches/{batch_id}/cancel \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/batches/{batch_id}/cancel",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/batches/{batch_id}/cancel", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
blocked |
string[] | IDs parked as 'blocked' instead of run: the org is out of included calculations (or is payment-blocked), so they were saved but NOT enqueued. Resume them with bulk-retry after topping up. Distinct from 'skipped' (wrong state) so the UI can prompt the unblock path, not an error. |
coverage |
CalculationCoverage | The billing hold the blocked ids are parked under — how many calculations remain and how to unblock them. Present only when something parked. Mirrors the same field on a batch submit, so a client renders one 'awaiting credits' path whichever endpoint parked the work. |
not_found |
string[] | IDs that did not match a calculation for this tenant. |
skipped |
string[] | IDs skipped because their state didn't allow the action. |
succeeded |
string[] | IDs of calculations the bulk action applied to successfully. |
unquotable |
string[] | IDs failed immediately instead of run: their environment has no machine that can be evaluated, so the calculation could not succeed however long it ran. Each row carries the reason. Distinct from 'blocked' (the org's wallet, resolvable by topping up) and from 'skipped' (wrong state) — this one is resolved by fixing the environment. |
Example response
{
"blocked": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"not_found": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"skipped": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"succeeded": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"unquotable": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}
Compare a batch's calculations across environments
GET /api/v1/calculations/batches/{batch_id}/comparison
Pivot one batch into a parts × environments matrix: per-cell costs and times, best environment per part (ties included), deltas vs the cheapest and vs the baseline environment, and per-environment aggregates (wins, median delta, basket total). All figures are computed server-side, so every consumer sees the same comparison. Poll while complete is false — cells fill in as their runs finish.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
batch_id |
path | string | yes | Identifier of the batch. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/batches/{batch_id}/comparison \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/batches/{batch_id}/comparison",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/batches/{batch_id}/comparison", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
baseline_environment_id |
string | The delta anchor environment. |
batch_id |
string | |
complete |
boolean | True when every cell is terminal or parked — nothing is still computing. |
environments |
ComparisonEnvironmentSummary[] | |
generated_at |
string | |
ignored_duplicates |
string[] | Calculations dropped because a newer run of the same part in the same environment was also supplied (ad-hoc comparisons only). |
mixed_calibration |
boolean | True when any cell carries calibration_mismatch: at least one column is aligned to your reported costs and another is the engine's unaligned estimate. The deltas are still real, but part of the gap may be alignment rather than the environments themselves, so a winner here is worth confirming by calibrating the other environments too. Deliberately a flag and not an incomparability: excluding uncalibrated columns would leave a tenant who has calibrated exactly one environment with no comparison at all. |
mixed_currency |
boolean | True when cells carry more than one currency; deltas, wins and basket totals are then restricted to same-currency comparisons. |
not_found |
string[] | Requested calculation ids that do not exist in your organization (ad-hoc comparisons only). |
parts |
ComparisonPartRow[] |
Example response
{
"baseline_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"complete": false,
"environments": [
{
"assembly_partial": 0,
"basket_total": 0,
"blocked": 0,
"calibrated_cells": 0,
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"currency": "EUR",
"failed": 0,
"median_delta_vs_baseline_pct": 0,
"name": "string",
"not_run": 0,
"pending": 0,
"stale_cells": 0,
"succeeded": 0,
"wins": 0
}
],
"generated_at": "2026-06-01T12:00:00Z",
"ignored_duplicates": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"mixed_calibration": false,
"mixed_currency": false,
"not_found": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"parts": [
{
"best_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cells": [
{}
],
"lot_size": 50,
"part_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"part_number": "BRACKET-001",
"part_revision_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"revision_code": "string"
}
]
}
Per-component drill-down of one assembly row of a comparison
GET /api/v1/calculations/batches/{batch_id}/comparison/components
For an assembly priced across environments, break one row of the comparison matrix down to its components: each unique component of the assembly becomes a row, each environment a column, every cell that component's own calculation in that environment — cost, live status and drill-down id. Components join across environments by their stable prototype key, so 'which part drives the difference between plants' is answerable at a glance. Empty components when the revision is not a decomposed assembly.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
batch_id |
path | string | yes | Identifier of the batch. |
part_revision_id |
query | string | yes | Identifier of the part revision. |
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/batches/{batch_id}/comparison/components \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/batches/{batch_id}/comparison/components",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/batches/{batch_id}/comparison/components", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
404 |
not_found |
A referenced resource doesn't exist or isn't visible to your organisation. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
batch_id |
string | |
components |
AssemblyComponentCompareRow[] | Empty when the row is not a decomposed assembly. |
environments |
string[] | Column order — identical to the batch comparison's. |
part_revision_id |
string |
Example response
{
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"components": [
{
"cells": [
{}
],
"component_key": "string",
"label": "string",
"position": 0
}
],
"environments": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"part_revision_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Bulk Cancel Calculations
POST /api/v1/calculations/bulk-cancel
Cancel several queued or running calculations at once, together with the component calculations of an assembly. Each id is reported as succeeded or skipped, for example when it had already finished.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
ids |
string[] | yes | Calculation IDs to act on (1–200). Duplicates collapse silently. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/bulk-cancel \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/bulk-cancel",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/bulk-cancel", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
blocked |
string[] | IDs parked as 'blocked' instead of run: the org is out of included calculations (or is payment-blocked), so they were saved but NOT enqueued. Resume them with bulk-retry after topping up. Distinct from 'skipped' (wrong state) so the UI can prompt the unblock path, not an error. |
coverage |
CalculationCoverage | The billing hold the blocked ids are parked under — how many calculations remain and how to unblock them. Present only when something parked. Mirrors the same field on a batch submit, so a client renders one 'awaiting credits' path whichever endpoint parked the work. |
not_found |
string[] | IDs that did not match a calculation for this tenant. |
skipped |
string[] | IDs skipped because their state didn't allow the action. |
succeeded |
string[] | IDs of calculations the bulk action applied to successfully. |
unquotable |
string[] | IDs failed immediately instead of run: their environment has no machine that can be evaluated, so the calculation could not succeed however long it ran. Each row carries the reason. Distinct from 'blocked' (the org's wallet, resolvable by topping up) and from 'skipped' (wrong state) — this one is resolved by fixing the environment. |
Example response
{
"blocked": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"not_found": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"skipped": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"succeeded": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"unquotable": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}
Bulk Delete Calculations
POST /api/v1/calculations/bulk-delete
Delete several calculations at once, together with the component calculations of an assembly. This cannot be undone. Each id is reported as succeeded or skipped.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
ids |
string[] | yes | Calculation IDs to act on (1–200). Duplicates collapse silently. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/bulk-delete \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/bulk-delete",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/bulk-delete", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
blocked |
string[] | IDs parked as 'blocked' instead of run: the org is out of included calculations (or is payment-blocked), so they were saved but NOT enqueued. Resume them with bulk-retry after topping up. Distinct from 'skipped' (wrong state) so the UI can prompt the unblock path, not an error. |
coverage |
CalculationCoverage | The billing hold the blocked ids are parked under — how many calculations remain and how to unblock them. Present only when something parked. Mirrors the same field on a batch submit, so a client renders one 'awaiting credits' path whichever endpoint parked the work. |
not_found |
string[] | IDs that did not match a calculation for this tenant. |
skipped |
string[] | IDs skipped because their state didn't allow the action. |
succeeded |
string[] | IDs of calculations the bulk action applied to successfully. |
unquotable |
string[] | IDs failed immediately instead of run: their environment has no machine that can be evaluated, so the calculation could not succeed however long it ran. Each row carries the reason. Distinct from 'blocked' (the org's wallet, resolvable by topping up) and from 'skipped' (wrong state) — this one is resolved by fixing the environment. |
Example response
{
"blocked": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"not_found": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"skipped": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"succeeded": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"unquotable": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}
Bulk Retry Calculations
POST /api/v1/calculations/bulk-retry
Re-enqueue eligible failed/cancelled/timed_out rows.
Each row goes through the same quota-gate + enqueue path as a
direct POST /run so subscription semantics and attempt budgets are
enforced identically. A row that's already running, succeeded, out of
attempt budget, or over a Free org's included quota lands in skipped.
A row whose environment can make nothing lands in unquotable, failed
immediately rather than enqueued to fail slowly.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
ids |
string[] | yes | Calculation IDs to act on (1–200). Duplicates collapse silently. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/bulk-retry \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/bulk-retry",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/bulk-retry", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
blocked |
string[] | IDs parked as 'blocked' instead of run: the org is out of included calculations (or is payment-blocked), so they were saved but NOT enqueued. Resume them with bulk-retry after topping up. Distinct from 'skipped' (wrong state) so the UI can prompt the unblock path, not an error. |
coverage |
CalculationCoverage | The billing hold the blocked ids are parked under — how many calculations remain and how to unblock them. Present only when something parked. Mirrors the same field on a batch submit, so a client renders one 'awaiting credits' path whichever endpoint parked the work. |
not_found |
string[] | IDs that did not match a calculation for this tenant. |
skipped |
string[] | IDs skipped because their state didn't allow the action. |
succeeded |
string[] | IDs of calculations the bulk action applied to successfully. |
unquotable |
string[] | IDs failed immediately instead of run: their environment has no machine that can be evaluated, so the calculation could not succeed however long it ran. Each row carries the reason. Distinct from 'blocked' (the org's wallet, resolvable by topping up) and from 'skipped' (wrong state) — this one is resolved by fixing the environment. |
Example response
{
"blocked": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"not_found": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"skipped": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"succeeded": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"unquotable": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}
Get Calculation Capacity
GET /api/v1/calculations/capacity
Introspect this organization's calculation capacity and queue state.
Read-only snapshot for bulk submitters: how many calculations may run in
parallel (inflight_cap), the plan's pending bound and how much of it
is used, and the organization's own queue. Poll it to pace a bulk
submission instead of discovering limits through 429 responses.
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/capacity \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/capacity",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/capacity", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
admission_enabled |
boolean | Whether submit-path admission control is active. When false, pending_bound is not enforced (submits always enqueue). |
completion_rate_per_s |
number | Completions per second the ETAs below were divided by — your organization's own measured rate over the recent window when eta_basis is org_rate, otherwise the plan-share estimate used in its place. Null when nothing is queued. Divide any position by this to reproduce its ETA. |
eta_basis |
string | Which rate the ETAs below were divided by: org_rate (your own measured throughput) or platform_default (a plan-share estimate for an organization with too little history). Null when nothing is queued. |
fair_scheduling |
boolean | Whether tenant-fair scheduling is active. When true, each organization's calculations are scheduled from its own queue and served in parallel with other customers, so another tenant's backlog cannot delay the start of yours. |
inflight_cap |
integer | Maximum calculations this organization may have RUNNING concurrently. Enforced only when inflight_enabled is true; calculations over the cap stay queued and start as slots free up. |
inflight_enabled |
boolean | Whether the per-organization concurrency cap is actively enforced. When false, inflight_cap is advisory only. |
inflight_now |
integer | Calculations currently running for this organization; null when the live counter is briefly unavailable. |
pending_bound |
integer | Your plan's pending-calculation bound: the maximum queued + running calculations this organization may hold at once. Submits beyond it are rejected with HTTP 429 until earlier calculations drain. |
pending_count |
integer | This organization's calculations currently queued or running (its admitted footprint). |
queue |
CalculationQueueEntry[] | Your organization's own waiting calculations, in the order they will be served, each with its 1-based position and ETA. Empty when nothing is waiting or when fair scheduling is off (with it off there is no per-organization queue to report a position in). Capped at 200 entries; queue_pending_total is the untruncated count. |
queue_pending_total |
integer | Total calculations waiting in your organization's queue, before the 200-entry cap applied to queue. |
tier_slug |
string | Subscription tier the caps below are derived from (e.g. free, pro, scale, enterprise); null when the org has no resolved tier (defaults apply). |
Example response
{
"admission_enabled": true,
"completion_rate_per_s": 184,
"eta_basis": "string",
"fair_scheduling": false,
"inflight_cap": 0,
"inflight_enabled": true,
"inflight_now": 0,
"pending_bound": 0,
"pending_count": 0,
"queue": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"eta_seconds": 0,
"position": 0
}
],
"queue_pending_total": 0,
"tier_slug": "string"
}
Compare an ad-hoc set of calculations across environments
POST /api/v1/calculations/comparison
The same parts × environments matrix as the batch comparison, for any set of your calculation ids — e.g. re-runs of the same parts from different days or batches. A read expressed as POST only because id lists don't fit in a query string; nothing is created or modified. Cells whose configuration diverges from their row's anchor are flagged incomparable_reasons instead of being silently compared.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
baseline_environment_id |
string | no | Delta anchor. Omit to anchor on your organization's baseline environment when the compared calculations include it, else on the first calculation's environment. Supplying an environment none of the calculations used anchors on the first calculation's environment. |
calculation_ids |
string[] | yes | Calculations to compare (duplicates collapse). Ids that do not exist in your organization are reported in not_found, never guessed at. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/comparison \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"calculation_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/comparison",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"calculation_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/comparison", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"calculation_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
baseline_environment_id |
string | The delta anchor environment. |
batch_id |
string | |
complete |
boolean | True when every cell is terminal or parked — nothing is still computing. |
environments |
ComparisonEnvironmentSummary[] | |
generated_at |
string | |
ignored_duplicates |
string[] | Calculations dropped because a newer run of the same part in the same environment was also supplied (ad-hoc comparisons only). |
mixed_calibration |
boolean | True when any cell carries calibration_mismatch: at least one column is aligned to your reported costs and another is the engine's unaligned estimate. The deltas are still real, but part of the gap may be alignment rather than the environments themselves, so a winner here is worth confirming by calibrating the other environments too. Deliberately a flag and not an incomparability: excluding uncalibrated columns would leave a tenant who has calibrated exactly one environment with no comparison at all. |
mixed_currency |
boolean | True when cells carry more than one currency; deltas, wins and basket totals are then restricted to same-currency comparisons. |
not_found |
string[] | Requested calculation ids that do not exist in your organization (ad-hoc comparisons only). |
parts |
ComparisonPartRow[] |
Example response
{
"baseline_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"complete": false,
"environments": [
{
"assembly_partial": 0,
"basket_total": 0,
"blocked": 0,
"calibrated_cells": 0,
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"currency": "EUR",
"failed": 0,
"median_delta_vs_baseline_pct": 0,
"name": "string",
"not_run": 0,
"pending": 0,
"stale_cells": 0,
"succeeded": 0,
"wins": 0
}
],
"generated_at": "2026-06-01T12:00:00Z",
"ignored_duplicates": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"mixed_calibration": false,
"mixed_currency": false,
"not_found": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"parts": [
{
"best_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cells": [
{}
],
"lot_size": 50,
"part_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"part_number": "BRACKET-001",
"part_revision_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"revision_code": "string"
}
]
}
Remaining calculation quota
GET /api/v1/calculations/entitlement
This organization's remaining included-calculation quota for the current window, plus the price past it and what the prepaid balance covers. Reports the limit before a bulk run is submitted rather than after a calc parks as blocked.
Request
curl -X GET https://api.arcnm.io/api/v1/calculations/entitlement \
-H "X-API-Key: $ARCNM_API_KEY"
import requests
resp = requests.get(
"https://api.arcnm.io/api/v1/calculations/entitlement",
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/entitlement", {
method: "GET",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
},
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
200 |
Successful Response |
422 |
Validation Error |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 200
| Field | Type | Description |
|---|---|---|
bonus |
integer | Extra calculations granted as a thank-you, valid this window. |
effective |
integer | Included plus rollover plus thank-you bonus — the real ceiling this window. |
guidance |
string | What the numbers mean and what to do next. |
included |
integer | Calculations included in the plan per window. |
over_quota |
boolean | True when used has reached the effective ceiling. |
overage_cents |
integer | Price of one calculation beyond the included volume, in cents. Null when this plan cannot bill overage. |
overage_settlement |
string | How overage is paid: 'wallet' (prepaid balance — top up to continue). Empty when the plan cannot bill overage. |
overage_spend_cents |
integer | Overage already billed in the current billing period — the quota window from window_start to window_end — in cents. |
payment_blocked |
boolean | True when billing is suspended (dunning) and no calculation will run. |
plan |
string | Subscription tier slug the quota applies to. |
remaining |
integer | Calculations the next start may still use without a charge: effective − used, less the calculations already running (they take theirs when they succeed), floored at 0. At 0, the next start is past the plan's included volume and pays its price from the prepaid balance. |
rollover |
integer | Unused calculations carried in from last window. |
used |
integer | Calculations already consumed this window. |
wallet_balance_cents |
integer | Prepaid balance in cents. Only meaningful for 'wallet' settlement. Null for API keys and agent grants: the balance is billing data, shown in the dashboard only. 'wallet_funded_calculations' and 'wallet_overdrawn' say what it means for your next runs. |
wallet_funded_calculations |
integer | How many more overage calculations the current balance covers. Null when settlement is not 'wallet'. |
wallet_locked |
boolean | True while the prepaid balance is paused: a payment on the account is disputed or flagged by the card issuer. Runs past the included volume then park as 'blocked' with coverage.reason 'wallet_locked' whatever the balance, and a top-up is refused; support resolves it. |
wallet_overdraft_cents |
integer | How far the prepaid balance is below zero, as a positive number of cents. 0 for a wallet that is not overdrawn. Null for API keys and agent grants, like 'wallet_balance_cents'. |
wallet_overdrawn |
boolean | True when the prepaid balance is below zero (a refund or a dispute took back money already spent). Runs past the included volume then park as 'blocked' until a top-up covers their price; a run is never charged more than its start reserved. |
window |
string | Quota window granularity: 'month' or 'year'. |
window_end |
string | ISO 8601 end of the current quota window, exclusive: when the included calculations reset. On a paid plan it is the end of the billing period. |
window_start |
string | ISO 8601 start of the current quota window. |
Example response
{
"bonus": 0,
"effective": 0,
"guidance": "string",
"included": 0,
"over_quota": true,
"overage_cents": 0,
"overage_settlement": "",
"overage_spend_cents": 0,
"payment_blocked": true,
"plan": "string",
"remaining": 0,
"rollover": 0,
"used": 0,
"wallet_balance_cents": 0,
"wallet_funded_calculations": 0,
"wallet_locked": false,
"wallet_overdraft_cents": 0,
"wallet_overdrawn": false,
"window": "string",
"window_end": "string",
"window_start": "string"
}
Quote
POST /api/v1/calculations/quote
Convenience: create + enqueue in one round-trip.
Equivalent to creating the calculation and then running it, in one
call. With
costing_environment_ids the part is priced in every requested
environment at once (one calculation per environment, grouped under
batch_id for comparison).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key |
header | string | no | Optional retry key. A retry with the same key and the same request within 24 hours returns the first answer and is not billed again; the same key with another request is a 409. As an MCP tool's idempotency_key: 1 to 128 letters, digits, ., _, : or -. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
annual_volume |
integer | no | Expected yearly quantity (1 to 1,000,000,000). It drives the lot-size recommendation and the holding cost, not the quoted unit price, which spreads setup over lot_size. On a re-run (derived_from_calculation_id), omitting it keeps the annual volume of the calculation re-run. |
costing_environment_id |
string | no | UUID of the costing environment (machine rates, region) to price against. Omit to use your organization's default environment (GET /whoami names it). |
costing_environment_ids |
string[] | no | Price this part in several environments at once, in comparison order. Each environment becomes one calculation and counts as one against the plan quota. Mutually exclusive with costing_environment_id; duplicates are collapsed preserving first occurrence. The response then carries batch_id and environment_runs. |
currency |
string | no | ISO 4217 currency code for the quote; defaults to the costing environment's currency when omitted. Another currency needs an exchange rate from the environment's currency: a code that is not ISO 4217 is refused with 422 currency_unknown, one the environment has no exchange rate into with 422 currency_not_configured, before any calculation is created. |
dataset_link_id |
string | no | UUID of a specific dataset link to use; omit to use the revision's active primary CAD. |
derived_from_calculation_id |
string | no | The calculation this one is re-run from — pass it when pricing again after a drawing was attached or from a result's own page, so the new calculation records what it supersedes. Must name a calculation of your organization; the new calculation is its own row and counts as one. |
engine |
string | no | Pricing engine selector; retained for back-compat and always normalized to the sole engine. |
full_stock_charge |
auto | full | full_no_credit | share |
no | How the started sheet or bar of the lot is charged: auto applies the environment's full_stock_threshold (the lot pays the whole piece once its parts fill that share of it, the unused cells credited as scrap where scrap is credited); full charges the whole piece at any lot; full_no_credit charges it whole with no scrap credit on the unused cells; share charges only the lot's share at any lot. A lot of whole pieces, or a piece holding one part, is charged the same under every word. On a re-run (derived_from_calculation_id), omitting it keeps the word of the calculation re-run. |
language |
string | no | BCP 47 language for the calculation's captured context (e.g. 'de', 'en'). |
lot_size |
integer | no | Number of identical parts produced per batch (1 to 1,000,000,000). On a re-run (derived_from_calculation_id), omitting it keeps the lot size of the calculation re-run. |
material_grade_id |
string | no | UUID of a resolved material grade; takes precedence over material_ref when both are supplied. On a re-run (derived_from_calculation_id), omitting both it and material_ref keeps the material the calculation re-run was asked for (one read from its drawing is read again). |
material_is_provided |
boolean | no | True when the customer supplies the raw material (beigestellt) — the material cost line is set to zero; machining, setup and overheads are billed normally. On a re-run (derived_from_calculation_id), omitting it keeps the value of the calculation re-run. |
material_ref |
string | no | Free-form material reference (URN, Werkstoffnummer, AISI/SAE code, trade name, or your SKU); resolved to a material grade. Unresolvable values are rejected with 422 material_unresolved plus ranked candidates. Omit to price the material read from the part's drawing (or the environment default). On a re-run (derived_from_calculation_id), omitting both it and material_grade_id keeps the material the calculation re-run was asked for (one read from its drawing is read again); send null to price the drawing's material instead. |
name |
string | no | Optional human-readable label; defaults to a timestamped name when omitted. |
nest_item_id |
string | no | Price this calculation's material on its part's line of a job nest — the id of a line (items[].id) of a job nest that has solved it. The material is then the line's share of the sheets the job nest cut it from together with other parts, less its share of what their skeleton and reusable rests earn back; everything else is priced as usual. The line must be of your organization, of this costing environment and of this part revision, and its job nest must have solved it; otherwise the request is rejected with 422 nest_item_unresolved, details.reason saying why. It cannot be combined with stock_format_id or with customer-supplied material. An upload creates a new part revision, so the upload forms reject every line. A line of the sheets an assembly shares among its own components prices that assembly only: naming one is rejected as not_found, and a re-run of such a component prices it on its own sheet. Omit it to price the part on its own sheet. On a re-run (derived_from_calculation_id), omitting it keeps the line of the calculation re-run; send null to price the part on its own sheet. |
part_revision_id |
string | yes | UUID of the part revision to price. |
provided_stock_kind |
none | near_net_profile | near_net_casting | sawn_blank |
no | Shape of the provided stock. 'near_net_profile' (extruded profile) additionally scopes the process plan to the features the profile does not already provide. On a re-run (derived_from_calculation_id), omitting it keeps the shape of the calculation re-run. |
region |
string | no | Pricing region override; defaults to the costing environment's region when omitted. |
stock_format_id |
string | no | Price this calculation on one stock format — the id of a format from GET /stock-formats. An id names the format, not only the version it came from: when the format has been changed since, the version current on the day the calculation is created is used. An id your organization cannot price with today (unknown, retired or hidden) is rejected with 422 stock_format_unresolved. When the part cannot be cut from that format — too small, not bought in the part's thickness or material, or one the machine cannot load — or is not cut from sheet at all (milled, turned or bought finished), the calculation is priced as if none had been chosen, and analytics.pipeline_notes says why (stock_format_pin_unavailable). Omit it to price on the format that uses the least material per part. On a re-run (derived_from_calculation_id), omitting it keeps the format of the calculation re-run; send null to price without one. |
stock_format_mm |
StockFormatMm | no | Price this calculation on a sheet of this size — length and width in mm — instead of a stock format from GET /stock-formats: the part is laid out on that one sheet, cut to size by your supplier, and the purchased stock says format_source custom. It cannot be combined with stock_format_id or nest_item_id. When the part does not fit the sheet, or is not cut from sheet stock at all, the calculation is priced as if none had been stated and analytics.pipeline_notes says why. On a re-run (derived_from_calculation_id), omitting both it and stock_format_id keeps the size or format of the calculation re-run; send null to price without one. |
stock_statement |
StockStatementRawPartPrice | no | The price per piece of the raw part the drawing names (a bought article, weldment, casting or near-net blank), in the costing environment's currency: {raw_part_unit_price}. The material line is then that amount and the raw part is neither stated as an assumption nor left out; a part whose drawing names no raw part is priced as without it. On a re-run (derived_from_calculation_id), omitting it keeps the price the calculation re-run stated; send null to state none. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/quote \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"part_revision_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/quote",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"part_revision_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/quote", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"part_revision_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
202 |
Successful Response |
422 |
Validation Error — or a refused reference: material_unresolved (the material names no grade in the catalogue), stock_format_unresolved (stock_format_id names no stock format your organization prices with today) or nest_item_unresolved (nest_item_id names no job-nest line that can price this calculation; details.reason says why). POST /calculations and /quote also refuse currency_unknown (currency is not an ISO 4217 code) and currency_not_configured (the environment has no exchange rate into currency). |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
402 |
insufficient_funds |
The pre-authorised wallet hold for the run exceeds your balance. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 202
| Field | Type | Description |
|---|---|---|
batch_id |
string | Groups the runs of a multi-environment quote; compare them via GET /calculations/batches/{batch_id}/comparison. Null for a single-environment quote. |
costing_environment_id |
string | UUID of the costing environment this calculation is priced against — the one you supplied, or your organization's default when you omitted it. Always echoed so a caller that omitted the field can tell which rates the quote used. |
coverage |
CalculationCoverage | Populated only when status='blocked': the calc was created but NOT enqueued because billing holds it (reason). Explains how many parts can still run and what lifts the block. null whenever the calc was enqueued. |
environment_runs |
EnvironmentRunStatus[] | All runs of a multi-environment quote, one per requested environment in comparison order. The top-level fields describe the first created run; poll each run (or the batch comparison) for results. Null for a single-environment quote. |
error |
string | Why the calculation failed, when this response already carries a terminal failed status — a run refused at submit time, before any worker. Null in every other case, including a normal enqueue: a run that fails LATER reports through the calculation itself, not through the response that started it. |
eta_basis |
string | How eta_seconds was derived, so the number is auditable: org_rate — divided by YOUR organization's own measured completions per second over the recent window; platform_default — your organization has too little recent history, so the estimate comes from your plan's parallelism and the platform's measured service time. Null when no ETA was computed. |
eta_seconds |
number | Estimated wait before this calculation reaches a result, derived from its queue position divided by a measured completion rate (advisory); null when not enqueued. See eta_basis for which rate was used. |
id |
string | UUID of the calculation. |
queue_position |
integer | 1-based position among YOUR organization's own queued and running calculations at enqueue time (backpressure hint); null when not enqueued. With tenant fair scheduling active your parts run in parallel with other customers, so another tenant's backlog does not push you back. |
status |
string | Current lifecycle state: 'draft' — created by POST /calculations but not yet submitted; it has no worker and no job and is priced only when you call POST /run — then queued, running, succeeded, failed, cancelled, timed_out, or 'blocked' — created but NOT started because billing holds it (see coverage). A blocked calc has no worker and no job. It starts by itself once a top-up is credited, a payment block ends or a paused balance is released; POST /run resumes it too. A component of an assembly, and a calculation held by its own max_overage_cents, do not start by themselves. |
Example response
{
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"environment_runs": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string",
"status": "string"
}
],
"error": "string",
"eta_basis": "string",
"eta_seconds": 0,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"queue_position": 0,
"status": "string"
}
Upload And Quote
POST /api/v1/calculations/upload-and-quote
One-shot upload + new-calculation flow.
Takes a STEP file (+ optional 2D drawing PDF + RFQ text), creates the underlying Part / PartRevision / dataset rows, and enqueues the calculation. This is the simplest end-to-end UX — the user goes from "I have a CAD file" to "I'll see a quote in 30 s" with one HTTP call.
Idempotency: part_number is the natural key — if a Part with
the same number already exists for this tenant, on_conflict
decides what happens, and filing in the response says what did.
Request body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
annual_volume |
integer | no | Expected yearly quantity (1 to 1,000,000,000). It drives the lot-size recommendation and the holding cost, not the quoted unit price, which spreads setup over lot_size. |
cad_file |
string | yes | STEP file (.step/.stp) to price; required — STEP is the only 3D format accepted. Export as STEP AP203/AP214/AP242. Or the DXF flat pattern of a sheet part (.dxf): then sheet_gauge_mm and a material are required, and the part is priced as a flat sheet part cut to that pattern. |
costing_environment_id |
string | no | UUID of the costing environment (machine rates, region) to price against. Omit to use your organization's default environment (GET /whoami names it). |
costing_environment_ids |
string[] | no | Price the part in several environments at once — repeat the field once per environment id, in comparison order. The file is uploaded once; each environment becomes one calculation and counts as one against the plan quota. The response then carries batch_id and environment_runs. Mutually exclusive with costing_environment_id; at most 16. |
currency |
string | no | ISO 4217 currency code for the quote; defaults to the costing environment's currency when omitted. |
drawing_file |
string | no | Optional 2D drawing (PDF/PNG/JPEG) for the part. |
drawings_follow |
boolean | no | An assembly's component drawings follow in POST /calculations/{id}/drawings right after this upload: the split into its parts waits for them, so every part prices with its drawing on its first run — one calculation each. Without it, a pack that arrives after the split prices each part it matches again, a calculation of its own. Not sent within 120 seconds, the split goes ahead without it. |
engine |
string | no | Pricing engine selector; retained for back-compat and always normalized to the sole engine. |
folder_id |
string | no | Optional workspace folder to file the created part into (bulk upload into a folder). |
language |
string | no | BCP 47 language for the calculation's captured context (e.g. 'de', 'en'). |
lot_size |
integer | no | Number of identical parts produced per batch (1 to 1,000,000,000). |
material_grade_id |
string | no | UUID of a resolved material grade; takes precedence over material_ref when both are supplied. |
material_is_provided |
boolean | no | True when the customer supplies the raw material (beigestellt) — the material cost line is set to zero. |
material_ref |
string | no | Free-form material reference (URN, Werkstoffnummer, AISI/SAE code, trade name, or your SKU). Unresolvable values are rejected with 422 material_unresolved plus ranked candidates. Omit to price the material read from the part's drawing (or the environment default). |
max_overage_cents |
integer | no | The most this calculation may cost past your plan's included calculations, in cents. Parts past it wait (run_spend_cap) instead of being charged; calculate them later. |
nest_item_id |
string | no | Price this calculation's material on its part's line of a job nest — the id of a line (items[].id) of a job nest that has solved it. The material is then the line's share of the sheets the job nest cut it from together with other parts, less its share of what their skeleton and reusable rests earn back; everything else is priced as usual. The line must be of your organization, of this costing environment and of this part revision, and its job nest must have solved it; otherwise the request is rejected with 422 nest_item_unresolved, details.reason saying why. It cannot be combined with stock_format_id or with customer-supplied material. An upload creates a new part revision, so the upload forms reject every line. A line of the sheets an assembly shares among its own components prices that assembly only: naming one is rejected as not_found, and a re-run of such a component prices it on its own sheet. Omit it to price the part on its own sheet. |
on_conflict |
keep_folder | move | new_part | skip |
no | How to resolve a part_number that already exists in this workspace. keep_folder — add a revision, leave the part where it is (the historical behaviour, now stated rather than assumed); move — add a revision AND re-file the part into folder_id; new_part — create a separate part under a distinct number (977 → 977-2); skip — upload nothing, create no calculation, meter nothing. Whatever happens is reported in filing. |
part_number |
string | yes | Natural-key part number; reused to attach a new revision if the part already exists. Must contain a non-space character. |
precheck_id |
string | no | |
precheck_revision |
string | no | |
provided_stock_kind |
none | near_net_profile | near_net_casting | sawn_blank |
no | Shape of the provided stock; 'near_net_profile' scopes the plan to the features the profile does not already provide. |
region |
string | no | Pricing region override; defaults to the costing environment's region when omitted. |
rfq_file |
string | no | Optional RFQ text file with requirements for the part. |
sheet_gauge_mm |
number | no | Sheet thickness in millimetres — required when the CAD file is a DXF flat pattern (a 2D cutting file carries no thickness); ignored for STEP. |
stock_format_id |
string | no | Price this calculation on one stock format — the id of a format from GET /stock-formats. An id names the format, not only the version it came from: when the format has been changed since, the version current on the day the calculation is created is used. An id your organization cannot price with today (unknown, retired or hidden) is rejected with 422 stock_format_unresolved. When the part cannot be cut from that format — too small, not bought in the part's thickness or material, or one the machine cannot load — or is not cut from sheet at all (milled, turned or bought finished), the calculation is priced as if none had been chosen, and analytics.pipeline_notes says why (stock_format_pin_unavailable). Omit it to price on the format that uses the least material per part. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/upload-and-quote \
-H "X-API-Key: $ARCNM_API_KEY" \
-F "part_number=BRACKET-001" \
-F "[email protected]"
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/upload-and-quote",
headers={"X-API-Key": "YOUR_API_KEY"},
files={
"cad_file": open("part.step", "rb"),
},
data={
"part_number": "BRACKET-001",
},
)
resp.raise_for_status()
print(resp.json())
const form = new FormData()
form.append("part_number", "BRACKET-001")
form.append("cad_file", file) // a File or Blob
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/upload-and-quote", {
method: "POST",
headers: { "X-API-Key": process.env.ARCNM_API_KEY! },
body: form,
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
202 |
Successful Response |
422 |
Validation Error — or a refused reference: material_unresolved (the material names no grade in the catalogue), stock_format_unresolved (stock_format_id names no stock format your organization prices with today) or nest_item_unresolved (nest_item_id names no job-nest line that can price this calculation; details.reason says why). POST /calculations and /quote also refuse currency_unknown (currency is not an ISO 4217 code) and currency_not_configured (the environment has no exchange rate into currency). |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
402 |
insufficient_funds |
The pre-authorised wallet hold for the run exceeds your balance. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 202
| Field | Type | Description |
|---|---|---|
batch_id |
string | Groups the runs of a multi-environment quote; compare them via GET /calculations/batches/{batch_id}/comparison. Null for a single-environment quote. |
costing_environment_id |
string | UUID of the costing environment this calculation is priced against — the one you supplied, or your organization's default when you omitted it. Always echoed so a caller that omitted the field can tell which rates the quote used. |
coverage |
CalculationCoverage | Populated only when status='blocked': the calc was created but NOT enqueued because billing holds it (reason). Explains how many parts can still run and what lifts the block. null whenever the calc was enqueued. |
environment_runs |
EnvironmentRunStatus[] | All runs of a multi-environment quote, one per requested environment in comparison order. The top-level fields describe the first created run; poll each run (or the batch comparison) for results. Null for a single-environment quote. |
error |
string | Why the calculation failed, when this response already carries a terminal failed status — a run refused at submit time, before any worker. Null in every other case, including a normal enqueue: a run that fails LATER reports through the calculation itself, not through the response that started it. |
eta_basis |
string | How eta_seconds was derived, so the number is auditable: org_rate — divided by YOUR organization's own measured completions per second over the recent window; platform_default — your organization has too little recent history, so the estimate comes from your plan's parallelism and the platform's measured service time. Null when no ETA was computed. |
eta_seconds |
number | Estimated wait before this calculation reaches a result, derived from its queue position divided by a measured completion rate (advisory); null when not enqueued. See eta_basis for which rate was used. |
files |
StoredUploadFile[] | Each file this upload stored — the CAD file, and the drawing and RFQ text when sent — with the server's SHA-256 of it. Null when nothing was stored (a skipped part, a precheck already started). |
filing |
PartFilingOutcome | What happened to the part and its folder. Always present on the upload routes. Check folder_applied before telling a user their files were filed where they asked. |
id |
string | UUID of the calculation. Null only when filing.action_taken is skipped — you asked for the conflict to be skipped, so no calculation was created. |
queue_position |
integer | 1-based position among YOUR organization's own queued and running calculations at enqueue time (backpressure hint); null when not enqueued. With tenant fair scheduling active your parts run in parallel with other customers, so another tenant's backlog does not push you back. |
skipped_files |
SkippedUploadFile[] | The drawing sent beside the CAD file when it does not open, left out with its reason; the part is priced without it. Null when every file was taken. |
status |
string | Current lifecycle state: 'draft' — created by POST /calculations but not yet submitted; it has no worker and no job and is priced only when you call POST /run — then queued, running, succeeded, failed, cancelled, timed_out, or 'blocked' — created but NOT started because billing holds it (see coverage). A blocked calc has no worker and no job. It starts by itself once a top-up is credited, a payment block ends or a paused balance is released; POST /run resumes it too. A component of an assembly, and a calculation held by its own max_overage_cents, do not start by themselves. |
Example response
{
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"environment_runs": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string",
"status": "string"
}
],
"error": "string",
"eta_basis": "string",
"eta_seconds": 0,
"files": [
{
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"filename": "bracket.step",
"role": "primary",
"sha256": "9f86d081884c7d659a2feaa0c55ad015…",
"size_bytes": 204800
}
],
"filing": {
"action_taken": "string",
"collided_with_part_number": "string",
"existing_part": true,
"folder_applied": true,
"folder_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"part_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"part_number": "BRACKET-001",
"previous_folder_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"requested_folder_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"queue_position": 0,
"skipped_files": [
{
"code": "string",
"filename": "bracket.step"
}
],
"status": "string"
}
Upload (base64 JSON) + quote in one call
POST /api/v1/calculations/upload-and-quote-json
JSON-body twin of /upload-and-quote for clients that can only pass strings (MCP): the CAD file — and optional drawing / RFQ — ride as base64 (or data: URI) strings, gzip-compressed or not. Base64 inflates ~33% and rides inside the call; a CAD file may be at most the same size as on every other upload path. Same find-or-create-by-part_number idempotency, billing, and enqueue semantics as the multipart route.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key |
header | string | no | Optional retry key. A retry with the same key and the same request within 24 hours returns the first answer and is not billed again; the same key with another request is a 409. As an MCP tool's idempotency_key: 1 to 128 letters, digits, ., _, : or -. |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
annual_volume |
integer | no | Expected yearly quantity (1 to 1,000,000,000). It drives the lot-size recommendation and the holding cost, not the quoted unit price, which spreads setup over lot_size. |
cad_content_type |
string | no | MIME type of the CAD file, when known. |
cad_file_b64 |
string | no | Base64 (or a data: URI) of the 3D CAD file (e.g. STEP). Required unless precheck_id is sent. |
cad_filename |
string | no | CAD filename including extension, e.g. bracket.step — used for format detection. Required with cad_file_b64. |
cad_sha256 |
string | no | SHA-256 of the file itself (before base64 and any gzip), hex. When sent, the file is refused with 422 checksum_mismatch unless it arrived with exactly this digest — nothing is stored or calculated then. |
costing_environment_id |
string | no | UUID of the costing environment to price against. Omit to use your organization's default environment. |
costing_environment_ids |
string[] | no | Price the part in several environments at once, in comparison order. The file is uploaded once; each environment becomes one calculation and counts as one against the plan quota. The response then carries batch_id and environment_runs. Mutually exclusive with costing_environment_id. |
currency |
string | no | ISO 4217 currency code for the quote; defaults to the costing environment's currency when omitted. |
drawing_content_type |
string | no | MIME type of the drawing file, when known. |
drawing_file_b64 |
string | no | Optional base64 (or data: URI) of a 2D drawing (PDF/PNG/JPEG). |
drawing_filename |
string | no | Drawing filename including extension. |
drawing_sha256 |
string | no | SHA-256 of the file itself (before base64 and any gzip), hex. When sent, the file is refused with 422 checksum_mismatch unless it arrived with exactly this digest — nothing is stored or calculated then. |
engine |
string | no | Pricing engine selector; retained for back-compat and always normalized to the sole engine. |
folder_id |
string | no | Optional workspace folder to file the created part into. |
language |
string | no | BCP 47 language for the calculation's captured context (e.g. 'de', 'en'). |
lot_size |
integer | no | Number of identical parts produced per batch (1 to 1,000,000,000). |
material_grade_id |
string | no | UUID of a resolved material grade; takes precedence over material_ref when both are supplied. |
material_is_provided |
boolean | no | True when the customer supplies the raw material (beigestellt). |
material_ref |
string | no | Free-form material reference (URN, Werkstoffnummer, AISI/SAE code, trade name, or your SKU). Unresolvable values are rejected with 422 material_unresolved plus ranked candidates. Omit to price the material read from the part's drawing (or the environment default). |
max_overage_cents |
integer | no | The most this calculation may cost past your plan's included calculations, in cents; parts past it wait (run_spend_cap). |
nest_item_id |
string | no | Price this calculation's material on its part's line of a job nest — the id of a line (items[].id) of a job nest that has solved it. The material is then the line's share of the sheets the job nest cut it from together with other parts, less its share of what their skeleton and reusable rests earn back; everything else is priced as usual. The line must be of your organization, of this costing environment and of this part revision, and its job nest must have solved it; otherwise the request is rejected with 422 nest_item_unresolved, details.reason saying why. It cannot be combined with stock_format_id or with customer-supplied material. An upload creates a new part revision, so the upload forms reject every line. A line of the sheets an assembly shares among its own components prices that assembly only: naming one is rejected as not_found, and a re-run of such a component prices it on its own sheet. Omit it to price the part on its own sheet. |
on_conflict |
keep_folder | move | new_part | skip |
no | How to resolve a part_number that already exists: keep_folder (add a revision, leave the part where it is — the historical behaviour), move (add a revision and re-file into folder_id), new_part (create a separate part under a distinct number), or skip (upload nothing, create no calculation, meter nothing). The outcome is always reported in filing. |
part_number |
string | yes | Natural-key part number; reused to attach a new revision if the part already exists. Must contain a non-space character. |
precheck_id |
string | no | Start this precheck (POST /prechecks): its stored file, drawings and statements — send no file. Starting it again answers with the calculation it started. |
precheck_revision |
string | no | The revision the precheck showed; refused with 409 precheck_changed when what it decides moved since. |
provided_stock_kind |
none | near_net_profile | near_net_casting | sawn_blank |
no | Shape of the provided stock; 'near_net_profile' scopes the plan. |
region |
string | no | Pricing region override; defaults to the costing environment's region when omitted. |
rfq_content_type |
string | no | MIME type of the RFQ file, when known. |
rfq_file_b64 |
string | no | Optional base64 (or data: URI) of an RFQ text file. |
rfq_filename |
string | no | RFQ filename including extension. |
sheet_gauge_mm |
number | no | Sheet thickness in millimetres — required when the CAD file is a DXF flat pattern (a 2D cutting file carries no thickness); ignored for STEP. |
stock_format_id |
string | no | Price this calculation on one stock format — the id of a format from GET /stock-formats. An id names the format, not only the version it came from: when the format has been changed since, the version current on the day the calculation is created is used. An id your organization cannot price with today (unknown, retired or hidden) is rejected with 422 stock_format_unresolved. When the part cannot be cut from that format — too small, not bought in the part's thickness or material, or one the machine cannot load — or is not cut from sheet at all (milled, turned or bought finished), the calculation is priced as if none had been chosen, and analytics.pipeline_notes says why (stock_format_pin_unavailable). Omit it to price on the format that uses the least material per part. |
Request
curl -X POST https://api.arcnm.io/api/v1/calculations/upload-and-quote-json \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"part_number": "BRACKET-001"
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/calculations/upload-and-quote-json",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"part_number": "BRACKET-001"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/calculations/upload-and-quote-json", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"part_number": "BRACKET-001"
}),
})
const data = await resp.json()
Responses
| Status | Description |
|---|---|
202 |
Successful Response |
422 |
Validation Error — or a refused reference: material_unresolved (the material names no grade in the catalogue), stock_format_unresolved (stock_format_id names no stock format your organization prices with today) or nest_item_unresolved (nest_item_id names no job-nest line that can price this calculation; details.reason says why). POST /calculations and /quote also refuse currency_unknown (currency is not an ISO 4217 code) and currency_not_configured (the environment has no exchange rate into currency). |
default |
Error — the error envelope; branch on error.code. |
Errors
Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.
| Status | Code | When |
|---|---|---|
401 |
invalid_api_key |
Missing, malformed, or revoked API key. |
403 |
insufficient_scope |
The key is valid but lacks a scope this endpoint requires. |
409 |
conflict |
A conflicting change, or an Idempotency-Key reused with a different body. |
429 |
rate_limited |
Per-key or per-org rate limit exceeded — back off with jitter and retry. |
Response body 202
| Field | Type | Description |
|---|---|---|
batch_id |
string | Groups the runs of a multi-environment quote; compare them via GET /calculations/batches/{batch_id}/comparison. Null for a single-environment quote. |
costing_environment_id |
string | UUID of the costing environment this calculation is priced against — the one you supplied, or your organization's default when you omitted it. Always echoed so a caller that omitted the field can tell which rates the quote used. |
coverage |
CalculationCoverage | Populated only when status='blocked': the calc was created but NOT enqueued because billing holds it (reason). Explains how many parts can still run and what lifts the block. null whenever the calc was enqueued. |
environment_runs |
EnvironmentRunStatus[] | All runs of a multi-environment quote, one per requested environment in comparison order. The top-level fields describe the first created run; poll each run (or the batch comparison) for results. Null for a single-environment quote. |
error |
string | Why the calculation failed, when this response already carries a terminal failed status — a run refused at submit time, before any worker. Null in every other case, including a normal enqueue: a run that fails LATER reports through the calculation itself, not through the response that started it. |
eta_basis |
string | How eta_seconds was derived, so the number is auditable: org_rate — divided by YOUR organization's own measured completions per second over the recent window; platform_default — your organization has too little recent history, so the estimate comes from your plan's parallelism and the platform's measured service time. Null when no ETA was computed. |
eta_seconds |
number | Estimated wait before this calculation reaches a result, derived from its queue position divided by a measured completion rate (advisory); null when not enqueued. See eta_basis for which rate was used. |
files |
StoredUploadFile[] | Each file this upload stored — the CAD file, and the drawing and RFQ text when sent — with the server's SHA-256 of it. Null when nothing was stored (a skipped part, a precheck already started). |
filing |
PartFilingOutcome | What happened to the part and its folder. Always present on the upload routes. Check folder_applied before telling a user their files were filed where they asked. |
id |
string | UUID of the calculation. Null only when filing.action_taken is skipped — you asked for the conflict to be skipped, so no calculation was created. |
queue_position |
integer | 1-based position among YOUR organization's own queued and running calculations at enqueue time (backpressure hint); null when not enqueued. With tenant fair scheduling active your parts run in parallel with other customers, so another tenant's backlog does not push you back. |
skipped_files |
SkippedUploadFile[] | The drawing sent beside the CAD file when it does not open, left out with its reason; the part is priced without it. Null when every file was taken. |
status |
string | Current lifecycle state: 'draft' — created by POST /calculations but not yet submitted; it has no worker and no job and is priced only when you call POST /run — then queued, running, succeeded, failed, cancelled, timed_out, or 'blocked' — created but NOT started because billing holds it (see coverage). A blocked calc has no worker and no job. It starts by itself once a top-up is credited, a payment block ends or a paused balance is released; POST /run resumes it too. A component of an assembly, and a calculation held by its own max_overage_cents, do not start by themselves. |
Example response
{
"batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"coverage": {
"included": 0,
"message": "string",
"reason": "wallet_empty",
"remaining": 0,
"tier_slug": "string",
"upgrade_url": "string",
"used": 0,
"window": "string"
},
"environment_runs": [
{
"calculation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"costing_environment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"reason": "string",
"status": "string"
}
],
"error": "string",
"eta_basis": "string",
"eta_seconds": 0,
"files": [
{
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"filename": "bracket.step",
"role": "primary",
"sha256": "9f86d081884c7d659a2feaa0c55ad015…",
"size_bytes": 204800
}
],
"filing": {
"action_taken": "string",
"collided_with_part_number": "string",
"existing_part": true,
"folder_applied": true,
"folder_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"part_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"part_number": "BRACKET-001",
"previous_folder_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"requested_folder_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"queue_position": 0,
"skipped_files": [
{
"code": "string",
"filename": "bracket.step"
}
],
"status": "string"
}