Open Inventory / Docs
EndpunkteScan workflowsStockScansResolve

Resolve and preview a scanned code without changing stock

Die API läuft auf deiner Anwendungsinstanz. Schemas und Feldnamen stammen unverändert aus der OpenAPI-Spezifikation. Browsergebundene Aufrufe benötigen eine Sitzung auf der Instanz.

POST
/stock/scans/resolve

Authentifizierung

bearerAuth
headerAuthentifizierungBearer <inv_ token>

Header-Parameter

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

Anfrageinhalt

application/json
  1. body
workflowId*string
Formatuuid
code*string
Länge1 <= length <= 2048
codeType?|null

Antwortinhalt

Reviewed scan target and required operator inputs

application/json
  1. response
workflow*
resource*
resources*array<>
targetGroups*array<>
selectedResourceIds*array<>
expectedTargets*array<>
identifier*string
Länge1 <= length <= 180
operation*||
unit*|null
willCreate*boolean
statusBefore*|null
statusAfter*|null
quantityBefore*integer
quantityAfter*integer
delta*integer
expectedResourceUpdatedAt*string

Resource version captured by resolve; execute rejects a stale quantity preview.

Formatdate-time
expectedUnitId*|

Unit captured by resolve, or null when no matching unit existed. Both unit guard fields must be null or non-null together.

expectedUnitUpdatedAt*|

Unit version captured by resolve, or null when no matching unit existed. Both unit guard fields must be null or non-null together.

fields*array<>
Einträgeitems <= 24
fixedProperties*array<>
Einträgeitems <= 24
metadataPreview*
customFieldsPreview*
executionPreview*
Beispielanfrage
curl -X POST 'https://inventory.example.com/api/v1/stock/scans/resolve' \  -H 'Content-Type: application/json' \  -d '{  "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",  "code": "string"}'
Beispielantwort
{  "workflow": {    "actions": [],    "oncePerCode": false,    "name": "string",    "description": "",    "enabled": true,    "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6",    "codeTypes": [      "qr_code",      "data_matrix",      "aztec",      "pdf417",      "code_128",      "code_93",      "code_39",      "codabar",      "ean_13",      "ean_8",      "upc_a",      "upc_e",      "itf"    ],    "publicTriggerEnabled": false,    "publicTriggerCode": "string",    "quantityInputKey": "string",    "extraction": {      "mode": "full"    },    "identifierPropertyKey": "string",    "identifierStorage": "custom-field",    "extractedFields": [],    "operation": {      "type": "unit"    },    "createMissingUnit": false,    "unitStatus": "available",    "fixedProperties": [      {        "key": "string",        "label": "string",        "value": "string",        "storage": "custom-field"      }    ],    "inputFields": [      {        "visibleWhen": {          "mode": "all",          "rules": [            {              "left": {                "source": "literal",                "value": "string"              },              "operator": "equals",              "right": {                "source": "literal",                "value": "string"              }            }          ]        },        "key": "string",        "label": "string",        "required": true,        "type": "text",        "storage": "custom-field",        "placeholder": "",        "options": []      }    ],    "triggerWebhook": false,    "webhookEventName": "inventory.action.executed",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "publicTriggerId": "df54c35d-9bab-440a-ba65-bab9b848a308",    "revision": 1,    "createdBy": "string",    "updatedBy": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "resource": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "quantity": 0,    "trackingMode": "bulk"  },  "resources": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "quantity": 0,      "trackingMode": "bulk",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "targetGroups": [    {      "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6",      "name": "string",      "options": [        {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "name": "string",          "quantity": 0,          "trackingMode": "bulk",          "updatedAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "selectedResourceIds": [    "a127bb13-ed3d-451b-9214-baddaa4f408c"  ],  "expectedTargets": [    {      "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6",      "resourceUpdatedAt": "2019-08-24T14:15:22Z",      "unitId": "b3eb5f92-604a-46b9-9881-9d84000fd7ed",      "unitUpdatedAt": "2019-08-24T14:15:22Z"    }  ],  "identifier": "string",  "operation": {    "type": "unit"  },  "unit": {    "status": "available",    "location": "string",    "locationResourceId": "cad4fbcc-0e81-4c59-9f5c-423e9329e3ec",    "metadata": {},    "customFields": {      "property1": "string",      "property2": "string"    },    "occurredAt": "2019-08-24T14:15:22Z",    "reason": "string",    "note": "string",    "totalPriceCents": -2000000000,    "priceCurrency": "str",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6",    "code": "string",    "acquisitionCostCents": 0,    "costCurrency": "string",    "acquiredAt": "2019-08-24T14:15:22Z",    "lastMovedAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "willCreate": true,  "statusBefore": "available",  "statusAfter": "available",  "quantityBefore": 0,  "quantityAfter": 0,  "delta": 0,  "expectedResourceUpdatedAt": "2019-08-24T14:15:22Z",  "expectedUnitId": "8fc0bcdb-84d5-44bf-ba9f-1b2906c142c9",  "expectedUnitUpdatedAt": "2019-08-24T14:15:22Z",  "fields": [    {      "visibleWhen": {        "mode": "all",        "rules": [          {            "left": {              "source": "literal",              "value": "string"            },            "operator": "equals",            "right": {              "source": "literal",              "value": "string"            }          }        ]      },      "key": "string",      "label": "string",      "required": true,      "type": "text",      "storage": "custom-field",      "placeholder": "",      "options": []    }  ],  "fixedProperties": [    {      "key": "string",      "label": "string",      "value": "string",      "storage": "custom-field"    }  ],  "metadataPreview": {},  "customFieldsPreview": {},  "executionPreview": {}}