---
title: "Fetch state machine"
method: GET
path: "/api/v1/state-machines/{id}"
tags: ["state-machines"]
---

# Fetch state machine

`GET /api/v1/state-machines/{id}`

Returns a state machine by its identifier.

## Path parameters

- `id` string, uuid, required

## Response `200`

State machine found.

- StateMachineFindResponse
  - `states` object[], required
    - `status` string
    - `label` string
    - `color` string, nullable
    - `actions` string[]
  - `id` string, required
  - `entity_type` 'ORDER' | 'FULFILLMENT_ORDER', required
  - `code` string, required
  - `name` string, required
  - `transitions` object[], required
    - `from` string, required
    - `to` string, required
  - `active` boolean, required
  - `is_default` boolean, required
  - `version` number, required
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `400` — Path parameter is not a UUID.
- `401` — Authentication is missing, malformed, expired, or refers to a session that is no longer active.
- `403` — The caller is authenticated but lacks the required permission for this action.
- `404` — StateMachine not found in the caller account.
- `500` — Unexpected server error. The response body never leaks internal details.

---

[API](https://skmtc.net/kruzer-corp/apis/oms-api.md) · [All operations](https://skmtc.net/kruzer-corp/apis/oms-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kruzer-corp/oms-api/revisions/38ef6e16a7a8/schema)
