---
title: Machines
description: The Machines API reads and updates the machines a costing environment prices against: fetch one, see where it is used across calculations, and update it.
---

# Machines

The Machines API reads and updates the machines a costing environment prices against: fetch one, see where it is used across calculations, and update it.

> **Auto-generated** from the public OpenAPI spec — this page never
> drifts from the running API. Base URL `https://api.arcnm.io`. Authenticate with
> the `X-API-Key` header (see [Authentication](../authentication.md)).

## One machine record, with the number of environments it is in

`GET /api/v1/machines/{machine_id}`

The machine as its record states it — rates, class, capabilities — plus `environment_count`: how many of your costing environments hold it in their fleet today, which is how far an edit to its rates reaches, and `currency`: the currency of those environments, which its rates are in.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `machine_id` | path | string | yes | Identifier of the machine. |

**Request**

<CodeTabs>

```bash title="cURL"
curl -X GET https://api.arcnm.io/api/v1/machines/{machine_id} \
  -H "X-API-Key: $ARCNM_API_KEY"
```

```python title="Python"
import requests

resp = requests.get(
    "https://api.arcnm.io/api/v1/machines/{machine_id}",
    headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
```

```typescript title="TypeScript"
const resp = await fetch("https://api.arcnm.io/api/v1/machines/{machine_id}", {
  method: "GET",
  headers: {
    "X-API-Key": process.env.ARCNM_API_KEY!,
  },
})
const data = await resp.json()
```

</CodeTabs>

**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](../errors.md) 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 |
| --- | --- | --- |
| `burden_rate` | number | Overhead burden added on top of the machine-hour rate, per hour in the environment's currency. |
| `capabilities` | object | The capability matrix you stated for this machine; empty for a machine that takes its capabilities from a machine-library entry. |
| `capability_overrides` | object | The capability values you stated for this machine over its machine-library entry, exactly as stored: only the keys you set. Empty for a machine with its own matrix in `capabilities`. |
| `currency` | string | ISO 4217 currency every rate of this machine is in: its environment's. On `GET /machines/{machine_id}` and its PATCH, the currency of the environments whose fleet holds it today; null when none does, or when they are in more than one currency — each reads the rates in its own. |
| `environment_count` | integer | Number of your costing environments whose fleet holds this machine today — the scope of an edit to its rates. Present on `GET /machines/{machine_id}`; absent on fleet rows. |
| `fx_per_eur` | number | On `GET /environments/{env_id}/machines`, where `rate_currency` is EUR and `currency` is not: units of `currency` per euro that a calculation costed today converts the rate at — `hourly_rate` times this is the machine hour it bills. Null everywhere else, and where no exchange rate converts the rate (the machine then prices nothing: `health` is `unresolvable`). |
| `hourly_rate` | number | Machine-hour rate per hour, in `rate_currency` (the environment's, unless the rate is the library's). |
| `id` | string | Unique identifier of the machine definition. |
| `klass` | string | Machine class (e.g. milling, turning, laser_cutter). |
| `library_entry_id` | string | Machine-library entry this machine was instantiated from; null if bespoke. |
| `model_no` | string | Vendor model number of the machine. |
| `name` | string | Human-readable name of the machine. |
| `programming_rate` | number | Programming rate per hour, in the environment's currency; null = the environment labour rate applies. |
| `rate_currency` | string | ISO 4217 currency `hourly_rate` and `rate_operator_per_h` are in: EUR while the rate is the machine library's — held as the library states it and converted into the environment's currency when a calculation prices it, at the exchange rate of its costing date — else `currency`. |
| `rate_operator_per_h` | number | Operator wage already contained in hourly_rate, per hour in `rate_currency`. 0 means the rate covers the machine only and operator labour is billed separately. |
| `rate_operator_share` | number | Share of an operator this machine consumes while it runs (0-1); setup is always fully attended. Null falls back to the machine class default. |
| `setup_rate` | number | Setup rate per hour, in the environment's currency; null = the machine hourly rate applies. |
| `source` | string | 'library' if instantiated from a catalog entry, else 'custom'. |
| `valid_from` | string | ISO date (YYYY-MM-DD) from which this machine definition is effective. |
| `valid_to` | string | ISO date (YYYY-MM-DD) the machine stops being effective; null = open-ended. |
| `vendor` | string | Manufacturer or vendor of the machine. |
| `wage_group` | string | Wage group of the people who operate this machine. Setup and the attended run bill the group's labour rate wherever the costing environment states one; null, or a group the environment does not state, bills the environment's labour rate. |

**Example response**

```json
{
  "burden_rate": 0,
  "capabilities": {},
  "capability_overrides": {},
  "currency": "EUR",
  "environment_count": 0,
  "fx_per_eur": 0,
  "hourly_rate": 0,
  "id": "string",
  "klass": "string",
  "library_entry_id": "string",
  "model_no": "string",
  "name": "string",
  "programming_rate": 0,
  "rate_currency": "string",
  "rate_operator_per_h": 0,
  "rate_operator_share": 0,
  "setup_rate": 0,
  "source": "custom",
  "valid_from": "string",
  "valid_to": "string",
  "vendor": "string",
  "wage_group": "string"
}
```

## Update Machine

`PATCH /api/v1/machines/{machine_id}`

Change one of your machines: its name, machine class, hourly rates (machine,
burden, programming, setup, operator) and capability overrides. Calculations run
afterwards use the new values.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `machine_id` | path | string | yes | Identifier of the machine. |

**Request body** (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `burden_rate` | number | no | Capital/overhead burden charged alongside the machine-hour rate, per hour in the environments' currency, on run time and setup time alike; 0 = none. Omit to leave. |
| `capability_overrides` | object | no | Capability fields to change. For a library-derived machine these merge over the library default (sparse override); for a bespoke machine they merge into its own capability matrix. |
| `hourly_rate` | number | no | New flat machine-hour rate per hour, in the currency of the environments the machine is in; at most the equivalent of 100 000 EUR. Omit to leave. |
| `klass` | `milling.3axis_vmc` \| `milling.5axis_full` \| `milling.indexable_3plus2` \| `turning.2axis_cnc` \| `turning.live_tool` \| `turning.swiss_type` \| `turning.mill_integrex` \| `press_brake` \| `laser_cutter` \| `plasma_cutter` \| `tube_bender` \| `turret_punch` \| `waterjet` \| `wire_edm` \| `sinter.dmls` \| `fdm_industrial` \| `injection_molding_press` \| `grinder.surface` \| `grinder.cylindrical` \| `slotter` \| `sink_edm` \| `weld_station` \| `saw.band` \| `saw.circular` \| `drill.pillar` \| `edm_drill` \| `oxyfuel_cutter` \| `plate_roll.3roll_light` \| `plate_roll.3roll_heavy` \| `plate_roll.4roll` \| `gear_hobber` \| `broaching.internal` \| `engraving.cnc` \| `marking.laser` | no | Correct the machine's process class (e.g. a lathe entered from a milling template). The machine is re-based on the new class's standard capability matrix and detached from its catalogue entry, because that entry describes a different kind of machine; name, rates and fleet memberships are kept. Omit to leave. |
| `name` | string | no | New machine name; omit to leave. |
| `programming_rate` | number | no | Programming rate per hour, in the environments' currency; -1 clears it (fall back to the environment labour rate); omit to leave. |
| `rate_operator_per_h` | number | no | Operator wage already contained in hourly_rate — and in setup_rate, which is the same rate on the setup envelope — per hour in the environments' currency; omit to leave. 0 means the rate covers the machine only and operator labour is billed separately — the default. Set it when the rate is all-in, so the operator is not charged twice. It cannot exceed either rate it is declared inside. Changed without a setup_rate in the same request, it moves a stored setup rate by the same amount, so setup bills the machine as before; a setup_rate sent with it is stored as sent, with this wage inside. |
| `rate_operator_share` | number | no | Share of an operator this machine consumes while it runs (0-1); omit to leave. Setup is always fully attended. Unset falls back to the machine class default. |
| `setup_rate` | number | no | Setup rate per hour, in the environments' currency; -1 clears it (fall back to the machine hourly rate); omit to leave. |
| `wage_group` | string | no | Wage group of the people who operate this machine, e.g. 'Facharbeiter'. Setup and the attended run bill the group's labour rate in every costing environment that states one, and the environment's labour rate everywhere else. Null or blank clears it; omit to leave. |

**Request**

<CodeTabs>

```bash title="cURL"
curl -X PATCH https://api.arcnm.io/api/v1/machines/{machine_id} \
  -H "X-API-Key: $ARCNM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "burden_rate": 0,
    "capability_overrides": {},
    "hourly_rate": 0,
    "klass": "milling.3axis_vmc",
    "name": "string",
    "programming_rate": 0,
    "rate_operator_per_h": 0,
    "rate_operator_share": 0,
    "setup_rate": 0,
    "wage_group": "string"
  }'
```

```python title="Python"
import requests

resp = requests.patch(
    "https://api.arcnm.io/api/v1/machines/{machine_id}",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={
        "burden_rate": 0,
        "capability_overrides": {},
        "hourly_rate": 0,
        "klass": "milling.3axis_vmc",
        "name": "string",
        "programming_rate": 0,
        "rate_operator_per_h": 0,
        "rate_operator_share": 0,
        "setup_rate": 0,
        "wage_group": "string"
    },
)
resp.raise_for_status()
print(resp.json())
```

```typescript title="TypeScript"
const resp = await fetch("https://api.arcnm.io/api/v1/machines/{machine_id}", {
  method: "PATCH",
  headers: {
    "X-API-Key": process.env.ARCNM_API_KEY!,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "burden_rate": 0,
    "capability_overrides": {},
    "hourly_rate": 0,
    "klass": "milling.3axis_vmc",
    "name": "string",
    "programming_rate": 0,
    "rate_operator_per_h": 0,
    "rate_operator_share": 0,
    "setup_rate": 0,
    "wage_group": "string"
  }),
})
const data = await resp.json()
```

</CodeTabs>

**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](../errors.md) 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 |
| --- | --- | --- |
| `burden_rate` | number | Overhead burden added on top of the machine-hour rate, per hour in the environment's currency. |
| `capabilities` | object | The capability matrix you stated for this machine; empty for a machine that takes its capabilities from a machine-library entry. |
| `capability_overrides` | object | The capability values you stated for this machine over its machine-library entry, exactly as stored: only the keys you set. Empty for a machine with its own matrix in `capabilities`. |
| `currency` | string | ISO 4217 currency every rate of this machine is in: its environment's. On `GET /machines/{machine_id}` and its PATCH, the currency of the environments whose fleet holds it today; null when none does, or when they are in more than one currency — each reads the rates in its own. |
| `environment_count` | integer | Number of your costing environments whose fleet holds this machine today — the scope of an edit to its rates. Present on `GET /machines/{machine_id}`; absent on fleet rows. |
| `fx_per_eur` | number | On `GET /environments/{env_id}/machines`, where `rate_currency` is EUR and `currency` is not: units of `currency` per euro that a calculation costed today converts the rate at — `hourly_rate` times this is the machine hour it bills. Null everywhere else, and where no exchange rate converts the rate (the machine then prices nothing: `health` is `unresolvable`). |
| `hourly_rate` | number | Machine-hour rate per hour, in `rate_currency` (the environment's, unless the rate is the library's). |
| `id` | string | Unique identifier of the machine definition. |
| `klass` | string | Machine class (e.g. milling, turning, laser_cutter). |
| `library_entry_id` | string | Machine-library entry this machine was instantiated from; null if bespoke. |
| `model_no` | string | Vendor model number of the machine. |
| `name` | string | Human-readable name of the machine. |
| `programming_rate` | number | Programming rate per hour, in the environment's currency; null = the environment labour rate applies. |
| `rate_currency` | string | ISO 4217 currency `hourly_rate` and `rate_operator_per_h` are in: EUR while the rate is the machine library's — held as the library states it and converted into the environment's currency when a calculation prices it, at the exchange rate of its costing date — else `currency`. |
| `rate_operator_per_h` | number | Operator wage already contained in hourly_rate, per hour in `rate_currency`. 0 means the rate covers the machine only and operator labour is billed separately. |
| `rate_operator_share` | number | Share of an operator this machine consumes while it runs (0-1); setup is always fully attended. Null falls back to the machine class default. |
| `setup_rate` | number | Setup rate per hour, in the environment's currency; null = the machine hourly rate applies. |
| `source` | string | 'library' if instantiated from a catalog entry, else 'custom'. |
| `valid_from` | string | ISO date (YYYY-MM-DD) from which this machine definition is effective. |
| `valid_to` | string | ISO date (YYYY-MM-DD) the machine stops being effective; null = open-ended. |
| `vendor` | string | Manufacturer or vendor of the machine. |
| `wage_group` | string | Wage group of the people who operate this machine. Setup and the attended run bill the group's labour rate wherever the costing environment states one; null, or a group the environment does not state, bills the environment's labour rate. |

**Example response**

```json
{
  "burden_rate": 0,
  "capabilities": {},
  "capability_overrides": {},
  "currency": "EUR",
  "environment_count": 0,
  "fx_per_eur": 0,
  "hourly_rate": 0,
  "id": "string",
  "klass": "string",
  "library_entry_id": "string",
  "model_no": "string",
  "name": "string",
  "programming_rate": 0,
  "rate_currency": "string",
  "rate_operator_per_h": 0,
  "rate_operator_share": 0,
  "setup_rate": 0,
  "source": "custom",
  "valid_from": "string",
  "valid_to": "string",
  "vendor": "string",
  "wage_group": "string"
}
```

## The costing environments whose fleet holds a machine

`GET /api/v1/machines/{machine_id}/usage`

A machine record is shared by every environment whose fleet holds it, so a change to its hourly rate moves every part priced on it in each of them. This says how many, and which, so a save from one calculation's cost sheet can state its scope before it writes.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `machine_id` | path | string | yes | Identifier of the machine. |

**Request**

<CodeTabs>

```bash title="cURL"
curl -X GET https://api.arcnm.io/api/v1/machines/{machine_id}/usage \
  -H "X-API-Key: $ARCNM_API_KEY"
```

```python title="Python"
import requests

resp = requests.get(
    "https://api.arcnm.io/api/v1/machines/{machine_id}/usage",
    headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
```

```typescript title="TypeScript"
const resp = await fetch("https://api.arcnm.io/api/v1/machines/{machine_id}/usage", {
  method: "GET",
  headers: {
    "X-API-Key": process.env.ARCNM_API_KEY!,
  },
})
const data = await resp.json()
```

</CodeTabs>

**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](../errors.md) 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 |
| --- | --- | --- |
| `environment_count` | integer | Number of your costing environments whose fleet holds this machine today. An edit to the machine's own rate reaches every one of them. |
| `environments` | MachineUsageEnv[] | Those environments, enabled and disabled memberships alike. |
| `machine_id` | string | Identifier of the machine. |

**Example response**

```json
{
  "environment_count": 0,
  "environments": [
    {
      "env_id": "string",
      "env_name": "string",
      "is_enabled": true
    }
  ],
  "machine_id": "string"
}
```
