Open Inventory / Docs
EndpunkteScan workflowsStockScan workflows

Create a stock scan workflow

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/scan-workflows

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
actions?array<||||||>

Ordered action list. Empty preserves the legacy operation. Results may reference only earlier actions. At least one action must be enabled.

Einträgeitems <= 24
Standard[]
oncePerCode?boolean

Deduplicate workflow + extracted identifier + selected target set, even with a new execution key.

Standardfalse
name*string
Länge1 <= length <= 160
description?string
Längelength <= 5000
Standard""
enabled?boolean
Standardtrue
resourceId*string
Formatuuid
codeTypes?array<>
Einträge1 <= items
Standard
[  "qr_code",  "data_matrix",  "aztec",  "pdf417",  "code_128",  "code_93",  "code_39",  "codabar",  "ean_13",  "ean_8",  "upc_a",  "upc_e",  "itf"]
publicTriggerEnabled?boolean
Standardfalse
publicTriggerCode?|

Optional fixed code used by the public URL; when null the public form asks for a code.

Länge1 <= length <= 2048
quantityInputKey?|

Required number input whose positive integer value replaces the configured operation magnitude.

Muster^[A-Za-z0-9_.-]+$
Länge1 <= length <= 80
extraction*|||
identifierPropertyKey*string
Muster^[A-Za-z0-9_.-]+$
Länge1 <= length <= 80
identifierStorage?string
Standard"metadata"
Mögliche Werte"custom-field""metadata""execution"
extractedFields?array<>
Einträgeitems <= 24
Standard[]
operation?||
createMissingUnit?boolean
Standardfalse
unitStatus?|null
fixedProperties?array<>
Einträgeitems <= 24
inputFields?array<>
Einträgeitems <= 24
triggerWebhook?boolean
Standardfalse
webhookEventName?string
Länge1 <= length <= 120
Standard"inventory.action.executed"

Antwortinhalt

Workflow created

application/json
  1. response
workflow*
Beispielanfrage
curl -X POST 'https://inventory.example.com/api/v1/stock/scan-workflows' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6",  "extraction": {    "mode": "full"  },  "identifierPropertyKey": "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"  }}