Open Inventory / Docs
EndpointsScan workflowsStockAction chainsPreview

Preview all actions without committing changes

The API runs on your application instance. Schemas and field names come directly from the OpenAPI specification. Session-authenticated requests require a session on that instance.

POST
/stock/action-chains/preview

Requires workflows.read. Runs the complete chain and rolls it back, returning planHash. Conditions and component selections are evaluated in order.

Authorization

bearerAuth
headerAuthorizationBearer <inv_ token>

Header Parameters

X-Organization-ID?string

Organization membership selected for this request. User-bound credentials may select any active membership; standalone tokens may only repeat their pinned organization ID.

Formatuuid

Request Body

application/json
  1. body
workflowId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
code*string
Length1 <= length <= 2048
codeType?|
Value in"qr_code""data_matrix""aztec""pdf417""code_128""code_93""code_39""codabar""ean_13""ean_8""upc_a""upc_e""itf"null
selectedResourceIds?array<>
Itemsitems <= 24
Default[]
inputs?
Default{}
expectedPlanHash?string
Match^[a-f0-9]{64}$

Response Body

Reviewed plan or previously completed execution

application/json
  1. response
workflowId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
revision*integer
Range-9007199254740991 <= value <= 9007199254740991
identifier*string
planHash*string
Match^[a-f0-9]{64}$
replayed?boolean
steps*array<>
Example Request
curl -X POST 'https://inventory.example.com/api/v1/stock/action-chains/preview' \  -H 'Content-Type: application/json' \  -d '{  "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",  "code": "string"}'
Example Response
{  "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",  "revision": -9007199254740991,  "identifier": "string",  "planHash": "string",  "replayed": true,  "steps": [    {      "id": "string",      "label": "string",      "type": "string",      "skipped": true,      "target": "string",      "eventName": "string",      "code": "string",      "quantityBefore": -9007199254740991,      "quantityAfter": -9007199254740991,      "statusBefore": "string",      "statusAfter": "string",      "locationBefore": "string",      "locationAfter": "string",      "metadata": {        "property1": null,        "property2": null      },      "customFields": {        "property1": null,        "property2": null      },      "components": [        {          "name": "string",          "quantity": -9007199254740991,          "codes": [            "string"          ]        }      ]    }  ]}