API reference
Import
The Import API bulk-loads your machine fleet and cutting-tool library from a file, with a preview call that validates every row before anything is written.
The Import API bulk-loads your machine fleet and cutting-tool library from a file, with a preview call that validates every row before anything is written.
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).
Import Machines
POST /api/v1/import/machines
Import your machine park from CSV text or a CSV / Excel upload. Machines are created with their class's standard capabilities, your capability columns over them (or, with as_library_instance, as instances of the class's standard type holding only what your columns state), with your make, model and the rate you state, and attached to the target environment. Re-uploading the same file is safe: existing machines are recognised by name and never duplicated.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
as_library_instance |
boolean | no | true creates each new machine as an instance of the platform's standard machine type for its class, holding only the capabilities your columns state; the type supplies the rest. false (the default) creates a machine of your own with its class's full standard capabilities and your columns over them. Machines you already have are attached as they are either way. |
csv |
string | no | The machine list as CSV text (headered; comma, semicolon or tab separated). Columns: name, class, hourly_rate_eur — plus optional operator_eur_per_h, envelope_x_mm / envelope_y_mm / envelope_z_mm, spindle_power_kw, priority, vendor, model_no, qty, and every machine capability as a column of its own under its field name (max_spindle_rpm, max_tool_diameter_mm, tool_interface, axes_simultaneous, axes_indexable, max_table_load_kg, tool_magazine_capacity, rapid_traverse_m_per_min, max_bar_diameter_mm, turret_stations, counter_spindle, bar_feeder, …). Header spellings are matched tolerantly, German ones and a unit after the name included (Drehzahl [1/min], max. Werkzeug-Ø, Werkzeugaufnahme, Stangendurchlass, Revolverplätze, Gegenspindel, Hersteller, Anzahl); a title above the header is skipped. Decimal commas, ja / nein and x are read as written. qty is read and shown, and each row is still one machine. At most 500 data rows. An upload (data_source_id) takes the same columns. |
data_source_id |
string | no | A confirmed upload holding the list as a .csv or .xlsx file (presign_upload, then confirm_upload). Send this or csv, not both. An API key or an agent's grant needs the uploads:read scope to name one. |
env_id |
string | no | Costing environment the machines join; omit for your default environment. |
expected_plan_digest |
string | no | The plan_digest of the preview you are confirming. When the import would now do something else (a row or the environment changed since), nothing is written and the answer is 409 plan_changed: preview again. |
sheet |
string | no | Worksheet of an Excel upload to read, by name; the first one when omitted. |
Request
curl -X POST https://api.arcnm.io/api/v1/import/machines \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"as_library_instance": false,
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"expected_plan_digest": "string",
"sheet": "string"
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/import/machines",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"as_library_instance": False,
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"expected_plan_digest": "string",
"sheet": "string"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/import/machines", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"as_library_instance": false,
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"expected_plan_digest": "string",
"sheet": "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. |
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 for a preview (nothing written); true for a commit. |
attached |
integer | Rows that attach (or would attach) an existing item. |
created |
integer | Rows that create (or would create) a new item. |
env_id |
string | The costing environment the import targets; null in a preview when your organization has no default environment yet. |
errored |
integer | Rows with errors; nothing happens for them. |
plan_digest |
string | Fingerprint of what the preview plans, row by row. Send it as expected_plan_digest with the import to write exactly this plan. |
rows |
ImportRowPublic[] | Per-row detail, in file order. |
skipped |
integer | Rows skipped as already present. |
total_rows |
integer | Data rows read from the file. |
unmapped_columns |
string[] | Header cells this import does not read, as written; their values are ignored. |
Example response
{
"applied": true,
"attached": 0,
"created": 0,
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errored": 0,
"plan_digest": "string",
"rows": [
{
"action": "create+attach",
"errors": [
"string"
],
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"library_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"parsed": {},
"row": 0
}
],
"skipped": 0,
"total_rows": 0,
"unmapped_columns": [
"string"
]
}
Preview Machine Import
POST /api/v1/import/machines/preview
Preview a machine-park import: per row, the values as read, any errors, and what the import would do — create the machine and attach it, attach a machine you already have under that name, or skip one already in the environment — and the columns it does not read. Nothing is written.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
as_library_instance |
boolean | no | true creates each new machine as an instance of the platform's standard machine type for its class, holding only the capabilities your columns state; the type supplies the rest. false (the default) creates a machine of your own with its class's full standard capabilities and your columns over them. Machines you already have are attached as they are either way. |
csv |
string | no | The machine list as CSV text (headered; comma, semicolon or tab separated). Columns: name, class, hourly_rate_eur — plus optional operator_eur_per_h, envelope_x_mm / envelope_y_mm / envelope_z_mm, spindle_power_kw, priority, vendor, model_no, qty, and every machine capability as a column of its own under its field name (max_spindle_rpm, max_tool_diameter_mm, tool_interface, axes_simultaneous, axes_indexable, max_table_load_kg, tool_magazine_capacity, rapid_traverse_m_per_min, max_bar_diameter_mm, turret_stations, counter_spindle, bar_feeder, …). Header spellings are matched tolerantly, German ones and a unit after the name included (Drehzahl [1/min], max. Werkzeug-Ø, Werkzeugaufnahme, Stangendurchlass, Revolverplätze, Gegenspindel, Hersteller, Anzahl); a title above the header is skipped. Decimal commas, ja / nein and x are read as written. qty is read and shown, and each row is still one machine. At most 500 data rows. An upload (data_source_id) takes the same columns. |
data_source_id |
string | no | A confirmed upload holding the list as a .csv or .xlsx file (presign_upload, then confirm_upload). Send this or csv, not both. An API key or an agent's grant needs the uploads:read scope to name one. |
env_id |
string | no | Costing environment the machines join; omit for your default environment. |
sheet |
string | no | Worksheet of an Excel upload to read, by name; the first one when omitted. |
Request
curl -X POST https://api.arcnm.io/api/v1/import/machines/preview \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"as_library_instance": false,
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sheet": "string"
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/import/machines/preview",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"as_library_instance": False,
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sheet": "string"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/import/machines/preview", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"as_library_instance": false,
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sheet": "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. |
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 for a preview (nothing written); true for a commit. |
attached |
integer | Rows that attach (or would attach) an existing item. |
created |
integer | Rows that create (or would create) a new item. |
env_id |
string | The costing environment the import targets; null in a preview when your organization has no default environment yet. |
errored |
integer | Rows with errors; nothing happens for them. |
plan_digest |
string | Fingerprint of what the preview plans, row by row. Send it as expected_plan_digest with the import to write exactly this plan. |
rows |
ImportRowPublic[] | Per-row detail, in file order. |
skipped |
integer | Rows skipped as already present. |
total_rows |
integer | Data rows read from the file. |
unmapped_columns |
string[] | Header cells this import does not read, as written; their values are ignored. |
Example response
{
"applied": true,
"attached": 0,
"created": 0,
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errored": 0,
"plan_digest": "string",
"rows": [
{
"action": "create+attach",
"errors": [
"string"
],
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"library_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"parsed": {},
"row": 0
}
],
"skipped": 0,
"total_rows": 0,
"unmapped_columns": [
"string"
]
}
Import Tools
POST /api/v1/import/tools
Import your tool crib from CSV text or a CSV / Excel upload. Tools are created with their
kind-specific properties validated (a saw blade needs its kerf and
construction; rotating cutters need nothing extra) and attached to
the target environment (your default one unless env_id names
another). Re-uploading the same file is safe:
existing tools are recognised by name and kind, never duplicated.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
csv |
string | no | The tool list as CSV text (headered). Columns: name, kind — plus optional diameter_mm, teeth, cutting_material, price_eur, tool_life_min, vendor, item_no, coating, notes, and any kind-specific property as its own column (e.g. kerf_mm, blade_type and format for a saw blade, life_quantity for non-rotating tools). An empty cutting_material is read as carbide for every kind, saw blades included — state it (e.g. hss_e) for a tool that is not carbide. At most 1000 data rows. An upload (data_source_id) takes the same columns. |
data_source_id |
string | no | A confirmed upload holding the list as a .csv or .xlsx file (presign_upload, then confirm_upload). Send this or csv, not both. An API key or an agent's grant needs the uploads:read scope to name one. |
env_id |
string | no | Costing environment the tools join; omit for your default environment. |
expected_plan_digest |
string | no | The plan_digest of the preview you are confirming. When the import would now do something else (a row or the environment changed since), nothing is written and the answer is 409 plan_changed: preview again. |
sheet |
string | no | Worksheet of an Excel upload to read, by name; the first one when omitted. |
Request
curl -X POST https://api.arcnm.io/api/v1/import/tools \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"expected_plan_digest": "string",
"sheet": "string"
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/import/tools",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"expected_plan_digest": "string",
"sheet": "string"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/import/tools", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"expected_plan_digest": "string",
"sheet": "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. |
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 for a preview (nothing written); true for a commit. |
attached |
integer | Rows that attach (or would attach) an existing item. |
created |
integer | Rows that create (or would create) a new item. |
env_id |
string | The costing environment the import targets; null in a preview when your organization has no default environment yet. |
errored |
integer | Rows with errors; nothing happens for them. |
plan_digest |
string | Fingerprint of what the preview plans, row by row. Send it as expected_plan_digest with the import to write exactly this plan. |
rows |
ImportRowPublic[] | Per-row detail, in file order. |
skipped |
integer | Rows skipped as already present. |
total_rows |
integer | Data rows read from the file. |
unmapped_columns |
string[] | Header cells this import does not read, as written; their values are ignored. |
Example response
{
"applied": true,
"attached": 0,
"created": 0,
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errored": 0,
"plan_digest": "string",
"rows": [
{
"action": "create+attach",
"errors": [
"string"
],
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"library_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"parsed": {},
"row": 0
}
],
"skipped": 0,
"total_rows": 0,
"unmapped_columns": [
"string"
]
}
Preview Tool Import
POST /api/v1/import/tools/preview
Preview a tool-crib import: per row, the values as read (including the kind-specific properties), any errors, and what the import would do. Nothing is written.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
csv |
string | no | The tool list as CSV text (headered). Columns: name, kind — plus optional diameter_mm, teeth, cutting_material, price_eur, tool_life_min, vendor, item_no, coating, notes, and any kind-specific property as its own column (e.g. kerf_mm, blade_type and format for a saw blade, life_quantity for non-rotating tools). An empty cutting_material is read as carbide for every kind, saw blades included — state it (e.g. hss_e) for a tool that is not carbide. At most 1000 data rows. An upload (data_source_id) takes the same columns. |
data_source_id |
string | no | A confirmed upload holding the list as a .csv or .xlsx file (presign_upload, then confirm_upload). Send this or csv, not both. An API key or an agent's grant needs the uploads:read scope to name one. |
env_id |
string | no | Costing environment the tools join; omit for your default environment. |
sheet |
string | no | Worksheet of an Excel upload to read, by name; the first one when omitted. |
Request
curl -X POST https://api.arcnm.io/api/v1/import/tools/preview \
-H "X-API-Key: $ARCNM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sheet": "string"
}'
import requests
resp = requests.post(
"https://api.arcnm.io/api/v1/import/tools/preview",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sheet": "string"
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/import/tools/preview", {
method: "POST",
headers: {
"X-API-Key": process.env.ARCNM_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"csv": "string",
"data_source_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sheet": "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. |
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 for a preview (nothing written); true for a commit. |
attached |
integer | Rows that attach (or would attach) an existing item. |
created |
integer | Rows that create (or would create) a new item. |
env_id |
string | The costing environment the import targets; null in a preview when your organization has no default environment yet. |
errored |
integer | Rows with errors; nothing happens for them. |
plan_digest |
string | Fingerprint of what the preview plans, row by row. Send it as expected_plan_digest with the import to write exactly this plan. |
rows |
ImportRowPublic[] | Per-row detail, in file order. |
skipped |
integer | Rows skipped as already present. |
total_rows |
integer | Data rows read from the file. |
unmapped_columns |
string[] | Header cells this import does not read, as written; their values are ignored. |
Example response
{
"applied": true,
"attached": 0,
"created": 0,
"env_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errored": 0,
"plan_digest": "string",
"rows": [
{
"action": "create+attach",
"errors": [
"string"
],
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"library_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"parsed": {},
"row": 0
}
],
"skipped": 0,
"total_rows": 0,
"unmapped_columns": [
"string"
]
}