Define a brand-new process path
POST/process-paths
Rejects with 409 if the given pathId is already defined — active or deactivated. A path's identity is permanent once created; a caller wanting to re-use an id after deactivation must be told explicitly, never silently overwritten. Publishes ProcessPathCreated on success.
Request
Responses
- 201
- 400
- 409
- 422
- 500
Path defined
Response Headers
Present, with the value true, ONLY when this response is a replay of the stored answer for the request's Idempotency-Key (the handler did not run again). The first execution of a key never carries it.
The request body is missing or not valid JSON (including a JSON number too large for eligibility.maxUnitsPerLine's int64 range, a null element inside requiredCapabilities, eligibility.requiredProductAttributes, eligibility.excludedProductAttributes or intake — every array element must be a string — or a NUL character U+0000 anywhere in the body), all malformed-request-body, or the Idempotency-Key header is absent (idempotency-key-required) or not 1-128 printable ASCII characters (idempotency-key-invalid). These 400s are functions of the request alone (class FINAL, ADR 0043): once the key is accepted they are stored, and a retry with the same key, method, path and body replays them with Idempotency-Replayed: true. A RETRYABLE refusal is never stored: the key is released and a retry executes again.
Response Headers
Present, with the value true, ONLY when this response is a replay of the stored answer for the request's Idempotency-Key (the handler did not run again). The first execution of a key never carries it.
A process path with this id already exists (active or deactivated), or the Idempotency-Key header was already used with a different method, path or body (idempotency-key-reused, distinguishable from the business conflict by the problem type). Both 409s of this route are final for the request (class FINAL, ADR 0043: a taken pathId is taken forever — deactivation keeps the row and there is no reactivate — and the reuse conflict is the store's own answer), so a retry under the same key replays them with Idempotency-Replayed: true.
Response Headers
Present, with the value true, ONLY when this response is a replay of the stored answer for the request's Idempotency-Key (the handler did not run again). The first execution of a key never carries it.
pathId is empty, matchPrefix is empty/not lower-case, requiredCapabilities is empty, cycleTimeP95 is not a positive Go duration string, destinationLocationRole is not one of Drop/WorkCenter/Shipping, or intake holds an unknown or repeated demand source (invalid-intake). These 422s are functions of the request's own fields (class FINAL, ADR 0043): a retry with the same key, method, path and body replays the stored 422 with Idempotency-Replayed: true.
Response Headers
Present, with the value true, ONLY when this response is a replay of the stored answer for the request's Idempotency-Key (the handler did not run again). The first execution of a key never carries it.
An unexpected error (problem type internal-error): a storage or other infrastructure failure, or a recovered panic. On POST /process-paths a 5xx is never stored under the Idempotency-Key, so a retry with the same key runs again.